40 lines
1.5 KiB
JSON
40 lines
1.5 KiB
JSON
{
|
|
"version": "0.2.0",
|
|
"configurations": [
|
|
{
|
|
"name": "构建并调试",
|
|
"type": "cppdbg",
|
|
"request": "launch",
|
|
"preLaunchTask": "project_debug_build_task", // 预构建任务
|
|
"program": "${workspaceFolder}\\Build\\Debug\\Target.exe", // 调试目标
|
|
"args": [ // 调试附加参数
|
|
],
|
|
"stopAtEntry": false,
|
|
"cwd": "${workspaceFolder}", // 工作目录
|
|
"environment": [],
|
|
"externalConsole": false,
|
|
"setupCommands": [
|
|
{
|
|
"description": "启用 GDB 美化打印 (Pretty-Printing)",
|
|
"text": "-enable-pretty-printing",
|
|
"ignoreFailures": true
|
|
},
|
|
{
|
|
"description": "设置主机字符集为 UTF-8 (适配终端)",
|
|
"text": "set host-charset UTF-8",
|
|
"ignoreFailures": true
|
|
},
|
|
{
|
|
"description": "设置目标窄字符集为 GBK (匹配 -fexec-charset=GBK)",
|
|
"text": "set target-charset GBK",
|
|
"ignoreFailures": true
|
|
},
|
|
{
|
|
"description": "设置目标宽字符集为 UTF-16LE (匹配 -fwide-exec-charset=UTF-16LE)",
|
|
"text": "set target-wide-charset UTF-16LE",
|
|
"ignoreFailures": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |