问题描述
我正在尝试使用 Windows 终端在 VSCode 上设置 C++ 开发。 这是我当前的配置:
{
"name": "g++.exe - Build and debug active file","type": "cppdbg","request": "launch","program": "${fileDirname}\\${fileBasenameNoExtension}.exe","args": [],"stopAtEntry": false,"cwd": "${workspaceFolder}","environment": [],"externalConsole": true,"MIMode": "gdb","miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe","setupCommands": [
{
"description": "Enable pretty-printing for gdb","text": "-enable-pretty-printing","ignoreFailures": true
}
],"prelaunchTask": "C/C++: g++.exe build active file"
}
其中 "externalConsole"
设置为 true
,"terminal.external.windowsExec"
设置为 "wt"
。
使用 Ctrl+Shift+C
打开外部终端有效,但是 当我调试我的文件时,它会在 cmd 窗口中打开。
我尝试使用自定义参数将 "program"
设置为 cmd
以启动 Windows 终端,然后启动 .exe,但这样调试器不会附加到 wt。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)