VSCode中C++调试突发Launch: program does not exist错误求助
VSCode调试C++时出现「Launch: program does not exist」错误
我使用VSCode编写C++已有两个月,此前一切正常。上周开始突发「Launch: program does not exist」等调试错误(目前已出现两次),同一程序在不同文件中运行会显示不同错误。该程序用于USACO铜级竞赛,上传至在线评测平台可正常运行,但在VSCode中仅特定程序出现此问题。
已尝试以下方案均无效:
- 重命名文件
- 复制程序到新文件
- 修改launch.json
- 卸载重装VSCode
仅文件中写入简单Hello World可正常运行,功能相同的其他代码也无法运行,今日另一无关程序也出现相同错误。
附当前launch.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": "(gdb) Launch", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}\\${fileBasenameNoExtension}.exe", "args": [], "stopAtEntry": false, "cwd": "C:\\msys64\\mingw64\\bin", "environment": [], "externalConsole": false, "MIMode": "gdb", "miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true }, { "description": "Set Disassembly Flavor to Intel", "text": "-gdb-set disassembly-flavor intel", "ignoreFailures": true } ] } ] }
内容的提问来源于stack exchange,提问作者hywl
相关产品推荐
相关产品推荐

