安装附件
C/C++ Extension Pack
vscode远程连接及调试
https://blog.csdn.net/cuijian2b/article/details/120535744
linux系统上 配置vscode+dbg 实现qemu源码调试
https://blog.csdn.net/GooTal/article/details/118862159
c_cpp_properties.cpp配置文件
https://blog.csdn.net/baidu_38634017/article/details/99875321
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) routing", // 配置名称,将会在启动配置的下拉菜单中显示
"type": "cppdbg",
"request": "launch", // 请求配置类型,可以为launch(启动)或attach(附加)
"program": "${workspaceRoot}/svr/routing/bin/TrunkDSS1RoutingSvrd", // 将要进行调试的程序的路径
"args": [],
"stopAtEntry": false, // 设为true时程序将暂停在程序入口处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, // 调试时是否显示控制台窗口,必须为true显示控制台,才能输入,交互
"MIMode": "gdb", // 指定连接的调试器,可以为gdb或lldb。
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "将反汇编风格设置为 Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
]
}
c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64",
"configurationProvider": "ms-vscode.makefile-tools"
}
],
"version": 4
}