Open Hofer-Julian opened 3 years ago
Bonus: Automatically build the application first.
adapt launch.json
to include preLaunchTask
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "gdb",
"request": "launch",
"preLaunchTask": "flatpak: build",
"gdbpath": "./gdb.sh",
"target": ".flatpak/repo/files/bin/shortwave",
"arguments": "",
"cwd": "${workspaceRoot}",
"valuesFormatting": "parseText"
},
]
}
add to your tasks.json
file
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"command": "flatpak-spawn --host flatpak build --share=network --nofilesystem=host --filesystem=/home/haecker-felix/Dokumente/Projekte/Shortwave --filesystem=/home/haecker-felix/Dokumente/Projekte/Shortwave/.flatpak/repo --env=PATH=$PATH:/usr/lib/sdk/rust-stable/bin --filesystem=/home/haecker-felix/Dokumente/Projekte/Shortwave/_build /home/haecker-felix/Dokumente/Projekte/Shortwave/.flatpak/repo meson install -C _build",
"label": "flatpak: build",
"group": "build"
}
]
}
Install Native Debug
Allow breakpoints everywhere (maybe native debug doesn't include .rs files? Let's open an issue there)
gdb.sh
executable.vscode/launch.json
with similar content (Replace the executable name with yours. We should also auto generate that)