views:

46

answers:

1

I'm writing a Visual Studio Add-In, nothing serious, just to experiment.
I need to evaluate a piece of code when the debugger is running, and It's being very hard for me to google / search in SO for it.

Let's say that hovering Person1.Name it will display "JustAName". I want from my add-in code, when a command is executed, evaluate the string "Person1.Name" (which is in the debugger context) and get the string "JustAName".

Is that possible?

+1  A: 

Use the Debugger.GetExpression() method.

Hans Passant
Worked!! thanks.
Matias
Actually, It was helpful. Using the debugger instance in my plugin's _applicationObject it's exactly what I wanted
Matias