C++VisualStudio——附加到进程调试
(2025-01-20 10:43:55)| 分类: 接口类的哈 |
C++ Visual Studio——绑定进程调试
Visual Studio 2022:
创建新项目 hello
world
项目上,新建文件:hello world.cpp
运行之后生成hello world.exe
在hello world.cpp 想停止的地方 断点
运行hello world.exe过程中
然后Visual Studio 2022 菜单栏 调试 附加到进程---hello world.exe,
当运行到断点,会停止,直接Visual Studio 2022进行调试。
如果是 修改cpp等项目内容要重新生成exe,重新运行。不然断点不到。
hello world.cpp
#include
#include
#include
int main()
{
system("pause");
}

加载中…