vscode 远程debug 调试linux上的makefile工程步骤

分为两步

1 扩展

很多扩展都需要提前安装
比如
c/c++
比较重要的是makefile tools

2 debug

点击debug按钮,打开launch.json,基本上只需要修改program的名字就行。

3 launch.json和settings.json

提供一个可以用的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}/utcsh",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "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
                }
            ]
        }
    ]
}

settings.json

{
    "makefile.extensionOutputFolder": "./.vscode"
}
上一篇:sublime 格式化Json


下一篇:MircoPython接入巴法云,esp8266和esp32环境