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

前端 未结 2 1018
囚心锁ツ
囚心锁ツ 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.

提交回复
热议问题