C++ 发射前';C/C++;:gcc.exe生成活动文件';以退出代码-1终止
当我在VisualStudio代码中调试代码时,我得到 启动前的“C/C++:gcc.exe生成活动文件”以退出代码-1终止 我使用cpp.exe构建了我的文件, 以下是launch.json文件:C++ 发射前';C/C++;:gcc.exe生成活动文件';以退出代码-1终止,c++,debugging,visual-studio-code,C++,Debugging,Visual Studio Code,当我在VisualStudio代码中调试代码时,我得到 启动前的“C/C++:gcc.exe生成活动文件”以退出代码-1终止 我使用cpp.exe构建了我的文件, 以下是launch.json文件: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https:
{
// 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": "gcc.exe - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "C://code//program.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc.exe build active file"
}
]
}
您的构建任务失败,可能是由于代码中的错误,请显示@AlanBirtles我甚至无法调试Hello World程序,但这并不意味着您无法提供。如果你是C++新手,我建议使用VisualStudio,因为它比代码更容易安装,明文有各种各样的问题。too@AlanBirtles无论我尝试调试什么代码,它都会显示相同的错误。