Is it possible to communicate with the Visual Studio debugger programmatically while debugging?

前端 未结 2 1016
囚心锁ツ
囚心锁ツ 2020-12-11 08:27

I would like to control options on the debugger without using the debugging GUI\'s, preferably from inside the code being debugged. I would think that would be quite diffic

相关标签:
2条回答
  • 2020-12-11 08:57

    You can write Visual Studio macros that can do anything the GUI can, but they can get rather involved. See the MSDN documentation on Automation and Extensibility for Visual Studio

    Doing this from the code being debugged would be tricky, you would definitely need some new form of communication with VS, maybe a custom add-in. I don't think an independent service would fundamentally help here. The biggest problem is that your code will stop running when the debugger breaks.

    0 讨论(0)
  • 2020-12-11 09:00

    I know that you can do it with WinDBG and OutputDebugString, but for Visual Studio, I think you have to spool off another process, pipe commands to that, and have that manipulate the Debugger API.

    0 讨论(0)
提交回复
热议问题