VSCode: Add launch tasks for debugging in vscode
This commit is contained in:
Vendored
+144
-10
@@ -5,13 +5,39 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "C++ Launch",
|
"name": "Debug salmanoff (Basic)",
|
||||||
"type": "cppdbg",
|
"type": "cppdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/b/salmanoff",
|
"program": "${workspaceFolder}/b/salmanoff",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}/b",
|
||||||
|
"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": "set disassembly-flavor intel",
|
||||||
|
"ignoreFailures": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preLaunchTask": "build-salmanoff",
|
||||||
|
"miDebuggerPath": "/usr/bin/gdb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Debug salmanoff (Help)",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/b/salmanoff",
|
||||||
|
"args": ["--help"],
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"cwd": "${workspaceFolder}/b",
|
||||||
"environment": [],
|
"environment": [],
|
||||||
"externalConsole": false,
|
"externalConsole": false,
|
||||||
"MIMode": "gdb",
|
"MIMode": "gdb",
|
||||||
@@ -22,15 +48,123 @@
|
|||||||
"ignoreFailures": true
|
"ignoreFailures": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"preLaunchTask": "Build",
|
"preLaunchTask": "build-salmanoff",
|
||||||
"miDebuggerPath": "/usr/bin/gdb",
|
"miDebuggerPath": "/usr/bin/gdb"
|
||||||
"logging": {
|
},
|
||||||
"trace": true,
|
{
|
||||||
"traceResponse": true,
|
"name": "Debug salmanoff (Verbose)",
|
||||||
"engineLogging": true,
|
"type": "cppdbg",
|
||||||
"programOutput": true,
|
"request": "launch",
|
||||||
"exceptions": true
|
"program": "${workspaceFolder}/b/salmanoff",
|
||||||
|
"args": ["--verbose"],
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"cwd": "${workspaceFolder}/b",
|
||||||
|
"environment": [],
|
||||||
|
"externalConsole": false,
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"setupCommands": [
|
||||||
|
{
|
||||||
|
"description": "Enable pretty-printing for gdb",
|
||||||
|
"text": "-enable-pretty-printing",
|
||||||
|
"ignoreFailures": true
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"preLaunchTask": "build-salmanoff",
|
||||||
|
"miDebuggerPath": "/usr/bin/gdb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Debug salmanoff (Custom Args)",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/b/salmanoff",
|
||||||
|
"args": ["--devicespec", "test_device", "--verbose"],
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"cwd": "${workspaceFolder}/b",
|
||||||
|
"environment": [],
|
||||||
|
"externalConsole": false,
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"setupCommands": [
|
||||||
|
{
|
||||||
|
"description": "Enable pretty-printing for gdb",
|
||||||
|
"text": "-enable-pretty-printing",
|
||||||
|
"ignoreFailures": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preLaunchTask": "build-salmanoff",
|
||||||
|
"miDebuggerPath": "/usr/bin/gdb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Attach to salmanoff (Remote Debug)",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "attach",
|
||||||
|
"program": "${workspaceFolder}/b/salmanoff",
|
||||||
|
"processId": "${command:pickProcess}",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"setupCommands": [
|
||||||
|
{
|
||||||
|
"description": "Enable pretty-printing for gdb",
|
||||||
|
"text": "-enable-pretty-printing",
|
||||||
|
"ignoreFailures": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"miDebuggerPath": "/usr/bin/gdb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Debug salmanoff (Break on Main)",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/b/salmanoff",
|
||||||
|
"args": ["--help"],
|
||||||
|
"stopAtEntry": true,
|
||||||
|
"cwd": "${workspaceFolder}/b",
|
||||||
|
"environment": [],
|
||||||
|
"externalConsole": false,
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"setupCommands": [
|
||||||
|
{
|
||||||
|
"description": "Enable pretty-printing for gdb",
|
||||||
|
"text": "-enable-pretty-printing",
|
||||||
|
"ignoreFailures": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Set breakpoint on main",
|
||||||
|
"text": "break main",
|
||||||
|
"ignoreFailures": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preLaunchTask": "build-salmanoff",
|
||||||
|
"miDebuggerPath": "/usr/bin/gdb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Debug salmanoff (ComponentThread Focus)",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/b/salmanoff",
|
||||||
|
"args": ["--help"],
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"cwd": "${workspaceFolder}/b",
|
||||||
|
"environment": [],
|
||||||
|
"externalConsole": false,
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"setupCommands": [
|
||||||
|
{
|
||||||
|
"description": "Enable pretty-printing for gdb",
|
||||||
|
"text": "-enable-pretty-printing",
|
||||||
|
"ignoreFailures": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Set breakpoint on ComponentThread constructor",
|
||||||
|
"text": "break ComponentThread::ComponentThread",
|
||||||
|
"ignoreFailures": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Set breakpoint on Mind constructor",
|
||||||
|
"text": "break Mind::Mind",
|
||||||
|
"ignoreFailures": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preLaunchTask": "build-salmanoff",
|
||||||
|
"miDebuggerPath": "/usr/bin/gdb"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+53
-43
@@ -2,68 +2,78 @@
|
|||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "Create Build Directory",
|
"label": "build-salmanoff",
|
||||||
"type": "shell",
|
|
||||||
"command": "mkdir -p b",
|
|
||||||
"problemMatcher": [],
|
|
||||||
"detail": "Creates the build directory."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Configure",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "${workspaceFolder}/configure",
|
|
||||||
"options": {
|
|
||||||
"cwd": "${workspaceFolder}/b"
|
|
||||||
},
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"problemMatcher": ["$gcc"],
|
|
||||||
"dependsOn": ["Create Build Directory"],
|
|
||||||
"detail": "Runs the configure script to prepare the build environment."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Build",
|
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "make",
|
"command": "make",
|
||||||
"options": {
|
|
||||||
"cwd": "${workspaceFolder}/b"
|
|
||||||
},
|
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
},
|
},
|
||||||
"problemMatcher": ["$gcc"],
|
"presentation": {
|
||||||
"dependsOn": ["Configure"],
|
"echo": true,
|
||||||
"detail": "Builds the project using make."
|
"reveal": "always",
|
||||||
|
"focus": false,
|
||||||
|
"panel": "shared",
|
||||||
|
"showReuseMessage": true,
|
||||||
|
"clear": false
|
||||||
|
},
|
||||||
|
"problemMatcher": [
|
||||||
|
"$gcc"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder}/b"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "clean",
|
"label": "clean-salmanoff",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "make clean",
|
"command": "make clean",
|
||||||
|
"group": "build",
|
||||||
|
"presentation": {
|
||||||
|
"echo": true,
|
||||||
|
"reveal": "always",
|
||||||
|
"focus": false,
|
||||||
|
"panel": "shared",
|
||||||
|
"showReuseMessage": true,
|
||||||
|
"clear": false
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"cwd": "${workspaceFolder}/b"
|
"cwd": "${workspaceFolder}/b"
|
||||||
},
|
}
|
||||||
"group": {
|
|
||||||
"kind": "none"
|
|
||||||
},
|
|
||||||
"problemMatcher": [],
|
|
||||||
"detail": "Cleans the build artifacts."
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "test",
|
"label": "rebuild-salmanoff",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "make test",
|
"command": "make clean && make",
|
||||||
|
"group": "build",
|
||||||
|
"presentation": {
|
||||||
|
"echo": true,
|
||||||
|
"reveal": "always",
|
||||||
|
"focus": false,
|
||||||
|
"panel": "shared",
|
||||||
|
"showReuseMessage": true,
|
||||||
|
"clear": false
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"cwd": "${workspaceFolder}/b"
|
"cwd": "${workspaceFolder}/b"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"group": {
|
{
|
||||||
"kind": "test",
|
"label": "run-salmanoff-help",
|
||||||
"isDefault": true
|
"type": "shell",
|
||||||
|
"command": "./salmanoff --help",
|
||||||
|
"group": "test",
|
||||||
|
"presentation": {
|
||||||
|
"echo": true,
|
||||||
|
"reveal": "always",
|
||||||
|
"focus": false,
|
||||||
|
"panel": "shared",
|
||||||
|
"showReuseMessage": true,
|
||||||
|
"clear": false
|
||||||
},
|
},
|
||||||
"problemMatcher": ["$gcc"],
|
"options": {
|
||||||
"detail": "Runs the tests."
|
"cwd": "${workspaceFolder}/b"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user