天天看點

vscode配置

{
    // 使用 IntelliSense 了解相關屬性。 
    // 懸停以檢視現有屬性的描述。
    // 欲了解更多資訊,請通路: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
 
        {
            "name": "test", //名稱随便取
            "type": "cppdbg", //調試類型
            "request": "launch", //請求配置類型
            "program": "${workspaceFolder}/a.out", //可執行程式完整路徑(包含程式名稱)
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}", //可執行程式完整路徑(不包含程式名稱)
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "test Debug", //task 任務名稱(與tasks.json中名稱一緻)
            "miDebuggerPath": "/usr/bin/gdb", //gdb完整路徑

            "sourceFileMap": 
            {
                "/build/glibc-e6zv40": "/usr/src/"
            }
        }
    ]
}      
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "test", //認為名稱
            "type": "shell", //類型
            "command": "make release", //指令
            "problemMatcher": []
        },
        {
            "label": "test Debug",
            "type": "shell",
            "command": "make",
            "problemMatcher": []
        }
    ]
}      

Mamba never out

上一篇: vscode
下一篇: vscode 插件