c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"D:/Kingsoft/mingw64/include/**",
"D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++",
"D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32",
"D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward",
"D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include",
"D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed",
"D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"__GNUC__=6",
"__cdecl=__attribute__((__cdecl__))"
],
"compilerPath": "D:/Kingsoft/mingw64/bin/gcc.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
launch.json
// {
// "version": "0.2.0",
// "configurations": [
// {
// "name": "(Windows) Launch",
// "type": "cppvsdbg",
// "request": "launch",
// "program": "cmd",
// "preLaunchTask": "echo",
// "args": [
// "/C",
// "${fileDirname}\\${fileBasenameNoExtension}.exe",
// "&",
// "echo.",
// "&",
// "pause"
// ],
// "stopAtEntry": false,
// "cwd": "${workspaceFolder}",
// "environment": [],
// "console":"newExternalWindow"
// },
// {
// "name": "(gdb) Launch",
// "type": "cppdbg",
// "request": "launch",
// "targetArchitecture": "x64",
// // "program": "C:/code/ccode1/exe/${fileBasenameNoExtension}.exe",
// "program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
// "miDebuggerPath": "D:\\Kingsoft\\mingw64\\bin\\gdb.exe",
// "args": [],
// "stopAtEntry": false,
// // "cwd": "${fileDirname}",
// // "cwd": "C:/code/ccode1/exe/",
// "cwd": "${workspaceFolder}",
// "externalConsole": true,
// "preLaunchTask": "g++"
// }
// ]
// }
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"targetArchitecture": "x64",
"program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
"miDebuggerPath": "D:\\Kingsoft\\mingw64\\bin\\gdb.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": true,
"preLaunchTask": "g++"
}
]
}
tasks.json
{
"version": "2.0.0",
"command": "g++",
"type": "shell",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "new",//shared表示共享,改成new后每个进程创建新的端口,"panel"->"new"
"showReuseMessage": true,
"clear": false
},
"args": [
// "-m32",
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
// "${fileDirname}/${fileBasenameNoExtension}.exe"
"${workspaceFolder}/${fileBasenameNoExtension}.exe"
// "C:/code/ccode1/exe/${fileBasenameNoExtension}.exe"
//"-fexec-charset=GBK"
],//编译命令参数
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc.exe 生成活动文件",
"command": "D:\\Kingsoft\\mingw64\\bin\\gcc.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
// "C:/code/ccode1/exe/${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "D:/Kingsoft/mingw64/bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。"
}
]
}
文章来源:https://www.toymoban.com/news/detail-688467.html
文章来源地址https://www.toymoban.com/news/detail-688467.html
到了这里,关于Visual Studio Code: launch.json的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!