DRAGON VS Code Debug Setup Instructions
-
Download & Install Static GDB
- Visit GDB release to download.
- Extract to a directory you own, e.g.
~/local/gdb-static-full-aarch64/
.
-
Create VS Code Workspace Folder
In your DRAGON project root, create a folder named .vscode/
.
-
Copy Helper Scripts
Place these into .vscode/
and make them executable:
prepare-rdragon.sh
launch.json
tasks.json
Then run:
chmod +x .vscode/prepare-rdragon.sh
-
Configure
launch.json
- Set
miDebuggerPath
to your GDB binary.
- Adjust
sourceFileMap
.
-
Install VS Code Extensions
- C/C++
- C/C++ Extension Pack
-
Recompile DRAGON with Debug Symbols
From project root:
make clean
make -C src FFLAGS="-O0 -g" CFLAGS="-O0 -g" LDFLAGS="-g"
-
Launch the Debugger
- Select “Debug DRAGON” in the Run & Debug view.
- Press F5 (or ▶️) to build, launch GDB, and begin debugging.
- Enter your x2m filename, for example: tmacro.x2m
That’s it! You should now be able to set breakpoints, step through your Fortran/C code, and inspect variables in VS Code.