以编程方式评估表达式/调试

发布于 2024-09-24 18:30:58 字数 284 浏览 0 评论 0原文

我正在编写一个 Visual Studio 插件,没什么大不了的,只是为了实验。
我需要在调试器运行时评估一段代码,并且对我来说很难在 SO 中搜索/搜索它。

假设将鼠标悬停在 Person1.Name 上,它将显示 "JustAName"。我希望在执行命令时从我的加载项代码中计算字符串 "Person1.Name" (位于调试器上下文中)并获取字符串 "JustAName".

这可能吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文