Skip to content

Instantly share code, notes, and snippets.

@borrrden
Created January 28, 2021 02:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save borrrden/ede5afd3950e3d5e94b14f24f419fef2 to your computer and use it in GitHub Desktop.
Save borrrden/ede5afd3950e3d5e94b14f24f419fef2 to your computer and use it in GitHub Desktop.
VSCode Setup for Debugging PonchoOS
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Kernel",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/kernel/bin/kernel.elf",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "Launch Qemu",
"miDebuggerPath": "/usr/bin/gdb",
"miDebuggerArgs": "",
"targetArchitecture": "x86_64",
"customLaunchSetupCommands": [
{
"text": "target remote localhost:1234",
"description": "Connect to QEMU remote debugger"
},
{
"text": "symbol-file kernel.elf",
"description": "Get kernel symbols"
}
],
"avoidWindowsConsoleRedirection": true
}
]
}
{
"debug.onTaskErrors": "debugAnyway",
}
{
"tasks": [
{
"type": "cppbuild",
"label": "Build kernel",
"command": "/usr/bin/make",
"args": [
"kernel",
"buildimg"
],
"options": {
"cwd": "${workspaceFolder}/kernel"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "process",
"label": "Launch Qemu",
"command": "explorer.exe",
"args": [
"run.bat"
],
"options": {
"cwd": "${workspaceFolder}/kernel"
},
"dependsOn": "Build kernel"
}
],
"version": "2.0.0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment