VSCode: Add launch tasks for debugging in vscode

This commit is contained in:
2025-09-03 14:56:49 -04:00
parent 0dc8abaa28
commit 3b224501c7
2 changed files with 199 additions and 55 deletions
+145 -11
View File
@@ -5,13 +5,39 @@
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch",
"name": "Debug salmanoff (Basic)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/b/salmanoff",
"args": [],
"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": [],
"externalConsole": false,
"MIMode": "gdb",
@@ -22,15 +48,123 @@
"ignoreFailures": true
}
],
"preLaunchTask": "Build",
"miDebuggerPath": "/usr/bin/gdb",
"logging": {
"trace": true,
"traceResponse": true,
"engineLogging": true,
"programOutput": true,
"exceptions": true
}
"preLaunchTask": "build-salmanoff",
"miDebuggerPath": "/usr/bin/gdb"
},
{
"name": "Debug salmanoff (Verbose)",
"type": "cppdbg",
"request": "launch",
"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"
}
]
}