Repository navigation
Debugger
The debugger runs a program of the project under GDB, or under the debug adapter of its language, from the source windows of the editor: breakpoints in the gutter, steps through the source, and the call stack, the local variables and the watches in a panel beside it. While the program is stopped, the values of the variables are shown at the end of the lines that use them.

bluerig -D . # or bluerig --debug DIRopens the project of that directory to debug it: its latest file, the tree of the project at the right and the panel of the debugger under it. Then:
- F6 on a line puts a breakpoint (Ctrl-F8 or Ctrl-B anywhere).
- F5 builds the project and runs it (Shift-F9 anywhere). The first time, the form Debug configuration shows what it found: the program the build made, its arguments, its directory and environment, GDB or a debug adapter. Enter takes it.
- The program runs in a terminal of its own, the tab Program at the bottom, which gets the keys while the program runs; when it stops, the focus goes back to the source.
A program without debug information, or built with optimization, is told of,
with the command that builds it fit for debugging. Without -D, the same keys
are in the Debug menu, and Debug > Debug keys in files turns the keys
of debug mode on.
The keys are those of IntelliJ IDEA, PyCharm and CLion where the editor leaves them free; F9 and F10 stay the menu and Quit.
| Key | Does |
|---|---|
| F5 | Continue (build and run, when nothing runs) |
| F7, F8, Shift-F8 | Step into, over, out |
| F4, Alt-F9 | Run to the cursor |
| F6, Ctrl-F8 | Toggle a breakpoint |
| Alt-F6 | A condition on the breakpoint: i == 7
|
| Enter, Alt-F8 | Evaluate the word or the selection; add it to the watches |
| Alt-F10 | Back to the line the program stopped at |
| Shift-F6 | Pause the running program |
| Shift-F5, Ctrl-F2 | Stop it |
| Alt-F5 | To the panel of the debugger and back |
| Shift-F7, Shift-F4 | Step by one machine instruction |
The state of the program and how long the last step took (ran 0.004 s: a slow line shows at once), the local variables, the registers when they are asked for, the watches, the call stack and the breakpoints. The console has what the program writes, when it has no terminal of its own, and what GDB says; a line typed there goes to GDB.
Most debuggers speak the Debug Adapter Protocol, and bluerig speaks it too. A program is given its adapter by the name of its file:
| File | Adapter |
|---|---|
.py |
python3 -m debugpy.adapter (a .venv of the project is used) |
.sh, .bash
|
bash-dap |
.go |
dlv dap |
.js, .mjs, .ts
|
js-debug-adapter |
| a program |
gdb -i dap, or GDB itself |
F6 on a line of a script, F5 and Enter in the form: the same as for C.
A project may have several configurations: Debug > New configuration,
Select configuration, Configure selected. They are kept with your
settings, or in .bluerig/debug.ini of the project for everyone who works on
it. When the debugger starts, the windows are put as the layout Debug has
them, and put back when it stops (Window > Layout).
bluerig on GitHub |
Issues |
F1 in the editor and man bluerig have the full reference.
The editor
Beside the text
Extending
About the wiki