发布于 2022-05-29 20:02:02
您的启动文件用于java脚本代码,而不是C/C++。
请按照Microsoft网站上的VS代码说明:
https://code.visualstudio.com/docs/cpp/config-msvc
或者在你的情况下:
https://code.visualstudio.com/docs/cpp/config-mingw
您的launch.json文件应该如下所示:
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\msys64\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}https://stackoverflow.com/questions/72426587
复制相似问题