我不知道我的 vscode 突然发生了什么我无法调试文件虽然我要运行我的 CPP 程序但无法调试请帮助我我连续花了 2-3 个小时试图修复我的调试器
我的程序运行良好,编译器正在创建一个 exe 文件,如下所示
就像它试图打开外部终端,但无法打开它,这是我想花一整天解决这个问题的原因
Lauch.json 文件
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "g++.exe - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"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"
}
]
}
任务文件
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\MinGW\\bin\\g++.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "compiler: C:\\MinGW\\bin\\g++.exe"
}
]
}
删除
为我工作。视窗 10
更多信息请参见:https : //github.com/microsoft/vscode-cpptools/issues/7971
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句