开发者

Programmatically evaluating expressions / debugging

开发者 https://www.devze.com 2023-01-17 23:17 出处:网络
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 / s

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消