Programmatic Expression Evaluation / Debugging

I am 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 is very difficult for me to find google / search in SO for it.

Say that when you hover it Person1.Namedisplays "JustAName". I want from my add-in code, when the command is executed, evaluate the line "Person1.Name"(which is in the debugger context) and get the line "JustAName".

Is it possible?

+3
source share
1 answer

Use the Debugger.GetExpression () method .

+1
source

Source: https://habr.com/ru/post/1766762/


All Articles