Skip to content

VS Code Execution_&&_Debugging configurations

guanqin-123 edited this page Feb 10, 2021 · 1 revision

Copy and Create file in /SVF-example/.vscode/c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**",
                "/home/SVF-master/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "gnu11",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "linux-gcc-x64"
        }
    ],
    "version": 4
}

Copy and Create file in /SVF-example/.vscode/task.json

{
    "tasks": [
        {
            "label": "C/C++: cpp build active file",
            "type": "shell",
            "command": "cmake -DCMAKE_BUILD_TYPE=Debug .. && make",
            "options": {
                "cwd": "${workspaceFolder}/src"
            },
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "Task generated by Debugger."
        }
    ],
    "version": "2.0.0"
}

Copy and Create file in /SVF-example/.vscode/launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "cpp - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/svf-ex",
            "args": ["${workspaceFolder}/test1.bc"], // change your target input bc file
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "miDebuggerPath": "/usr/bin/gdb"
        }
    ]
}