【发布时间】:2017-02-10 15:16:18
【问题描述】:
我在 Windows 上配置 launch.json 文件时遇到问题,它显示错误消息
调试适配器进程意外终止。
我已经设置了“MinGW”并配置了 g++ 编译器,现在 Visual Studio Code 可以正确编译。当我按下 Ctrl+Shift+B 时,它会在项目文件夹中创建 a.exe 文件。
我的 launch.json 文件:
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch (Windows)",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceRoot}/a.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": [],
"externalConsole": false
},
{
"name": "C++ Attach (Windows)",
"type": "cppvsdbg",
"request": "attach",
"processId": "${command.pickProcess}"
}
]
}
我的 task.json 文件:
{
"version": "0.1.0",
"command": "g++",
"isShellCommand": true,
"showOutput": "always",
"args": ["-std=c++11","-g", "main.cpp"]
}
【问题讨论】:
标签: c++ json visual-studio visual-studio-code