Is it possible to somehow get the debugger context in F# interactive? For instance, if I hit a breakpoint in C# project then I would like to work with local variables in F# interactive, the same way I can work with them in immediate window. Is there any way to do so? Or do I need to create a debugger visualizer for that?
Asked
Active
Viewed 706 times
2 Answers
1
Neither. You need to create an Expression Evaluator for it. Not sure if C# can be extended, but there is a sample in the VS SDK (the 2008 one at least).

leppie
- 115,091
- 17
- 196
- 297
-
Do you think it's not possible with debugger visualizer? I found this one on codeplex http://poshdebugvisualizer.codeplex.com and it seems to do what I want only with PowerShell. I would rather go with IronPython, IronRuby or even C#, if not with F#. – Max Jan 20 '11 at 17:01
-
If you make it like that I guess, but not for functionality in the watch and immediate windows. From what I can see you need to decorate every type with that DebugVisualizer attribute, which is hardly convenient. – leppie Jan 20 '11 at 17:06
-
Here's another plugin http://code.google.com/p/linqpadvisualizer which allows to use visualizer with any C# type without any decoration. – Max Jan 20 '11 at 18:39
0
I've make very similar tool for Python, so I'm just using Python shell to evaluate some expressions like in Immediate Window. For this I've created a very simple VS Add-In and Python helper script. You can find sources on github - https://github.com/dp0h/VsImmediate

Andrei Visnakovs
- 120
- 3
- 7