Delve is a debugger for the Go programming language. Undo has extended Delve to provide support for the UDB time travel debugger.
Undo is working with the upstream Delve community to incorporate support in the official release versions of the tool, and to extend the time travel debugging functionality. While that continues we have made available a version of Delve that supports UDB. This can be obtained using:
go install github.com/undoio/delve/cmd/dlv@latest
Using UDB within Delve¶
The UDB tools (udb and live-record) must be on your
PATH, and the Delve command must be started with the
option, for example:
dlv debug --backend=undo my-executable
dlv replay command is an exception: it automatically detects the recording file format and does not need
Within Delve, use these commands for time travel debugging:
rw) runs backwards until a breakpoint is hit or the start of recorded history is reached.
check) sets a checkpoint at the current position.
checkpointsshows the currently defined checkpoints.
clearcheck) deletes the checkpoint
r) moves execution to checkpoint
rev s) steps backwards to the previous source line.
rev si) steps backwards a single CPU instruction.
rev n) steps backwards to the previous source line, not counting function calls.
rev so) steps backwards out of the current function.
Problem: “Command failed: command not available” in response to a
Cause: Delve is using a different backend.
Solution: Use the
--backend=undocommand line option to
Problem: “could not launch process: backend unavailable”
Cause: The UDB tools (udb and live-record) are not on your
Solution: Update your
Problem: “protocol error E03 during registers read for packet $g”
Cause: UDB cannot find a valid license keyfile.
Solution: Copy the keyfile to
keyin the same directory as the UDB tools.