... maybe I'll think of a better name in the future.
- Delve is a bit clunky to use and I don't like vscode or goland.
- gdb-dashboard looks cool and gets the job done.
go install github.com/philippta/god@latest
Bit shitty for now, but this is how you use it:
# in one terminal
dlv debug path/to/pkg --headless --listen 127.0.0.1:6060
# in another terminal
god| Command | Alias | Description |
|---|---|---|
continue |
c |
Continue program execution until the next breakpoint or program termination. |
next |
n |
Step to the next source line in the current function, stepping over function calls. |
step |
s |
Step to the next source line, stepping into function calls. |
stepout |
so |
Continue execution until the current function returns. |
nexti |
ni |
Step to the next CPU instruction, stepping over function calls. |
stepi |
si |
Step to the next CPU instruction, stepping into function calls. |
quit |
q |
Exit the debugger session. |
pane source |
pane src |
Toggle the visibility of the source code pane. |
pane assembly |
pane asm |
Toggle the visibility of the assembly code pane. |
pane variables |
pane vars |
Toggle the visibility of the variables pane. |
pane breakpoints |
pane bp |
Toggle the visibility of the breakpoints pane. |
pane watch |
pane w |
Toggle the visibility of the watch pane. |
pane threads |
pane t |
Toggle the visibility of the theads pane. |
grow source |
grow src |
Increase the height of the source code pane by 2 lines. |
grow assembly |
grow asm |
Increase the height of the assembly code pane by 2 lines. |
shrink source |
shrink src |
Decrease the height of the source code pane by 2 lines (minimum height is 1). |
shrink assembly |
shrink asm |
Decrease the height of the assembly code pane by 2 lines (minimum height is 1). |
break <location> |
b <location> |
Create a breakpoint at the specified location. <location> can be file:line, line (in the current file), or a functionName. |
clear <id> |
c <id> |
Remove (clear) the breakpoint with the specified numeric ID. |
watch <expr> |
w <expr> |
Add the specified expression <expr> to the watch list. |
unwatch <arg> |
uw <arg> |
Remove a watch entry. <arg> can be the numeric ID (starting from 1) or the exact expression string. |
thread <id> |
t <id> |
Switches to the thread with the specific numeric ID. |
(empty command) |
Repeat the last command that was entered. |
Notes:
<id>refers to the numeric identifier of a breakpoint (forclear) or a watch entry (forunwatch).<location>specifies where to set a breakpoint (file:line,line,functionName).<expr>refers to the variable or expression string to be watched.<arg>forunwatchcan be either a numeric ID or the expression string itself.- The alias
cis used forcontinue, whilec <id>is used forclear <id>. The space and argument differentiate them. Similarly,w <expr>anduw <arg>require arguments.
This is early stage, just a couple hours in. Pls don't read the code. Use at your own risk.
