Visual Studio中使用Windbg的最小设置

下面是在Visual C++ 中配置Windbg的一个例子。
首先找到下面的菜单

点击弹出

点击"Add"做如下配置

Title &Windbg
Command C:Program Files (x86)Debugging Tools for Windows (x86)windbg.exe
Arguments -srcpath $(ProjectDir) $(TargetPath)
Initial directory $(TargetDir)

保存配置并测试它是否有效。打开生成可执行文件的项目。选择“工具”,然后选择“Windbg”启动调试器。
在命令窗口中键入.open example.cpp以加载源代码。“源”窗口将弹出,其中包含源文件。在“源”窗口中移动光标,然后按F9键放置断点。
原文地址:https://www.cnblogs.com/yilang/p/12165181.html