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, a开发者_运维百科nd 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?
Use the Debugger.GetExpression() method.
精彩评论