Introducing Delve: A Go Debugger

2,178 views
Skip to first unread message

Derek Parker

unread,
Nov 10, 2014, 8:10:25 AM11/10/14
to golan...@googlegroups.com
I'd like to announce the beta release of Delve, the Go debugger I've been working on for some time.

https://github.com/derekparker/delve

It supports attaching to a running process, or it will start a process up for you and begin a debugging session. It supports all the standard debugger actions such as step, next, printing variables, printing status of all threads, and even printing the status of all goroutines.

The project is still definitely beta, but I feel it's at the point where it could actually be useful to Gophers. I started this project a while ago as a fun side project to work on and I feel like it's turned into something useful that to Go community could leverage.

Currently it will only build on Linux 64-bit (with trivial modifications to build on 32-bit systems) with support for OS X planned. Lastly, it supports basic variable evaluation, however support for more types and better scoping is planned as well.

Anyway, I hope people find it useful and I look forward to any issues, feature requests and pull requests!

Markus Zimmermann

unread,
Nov 10, 2014, 10:24:37 AM11/10/14
to golan...@googlegroups.com
Looks really nice. I tried it with some small examples. Looking forward to see more features!

I am wondering though why are you using the binary name "dlv" instead of "delve"?

Derek Parker

unread,
Nov 10, 2014, 10:42:26 AM11/10/14
to golan...@googlegroups.com
Cool, thanks!

The naming is mostly for convenience at the command line, honestly. It seemed easier to type 3 letters instead of 5, but with shell completion it's usually not that big of a deal.

Markus Zimmermann

unread,
Nov 10, 2014, 11:03:50 AM11/10/14
to golan...@googlegroups.com
The repository currently results into two binaries if your documentation is followed. "go get" runs build and install and since the main.go is in the root of the repository a binary called "delve" is automatically compiled. Doing "go build -o dlv ..." results into a second binary. I suggest that you put main.go and main_test.go into the folder "cmd/dlv" so go get builds the binary as "dlv". But my personal opinion is that the name "delve" is just fine.

Derek Parker

unread,
Nov 10, 2014, 1:02:01 PM11/10/14
to golan...@googlegroups.com
That's a good point, I may just update the README to specify using delve at the command line.

Bruno Medeiros

unread,
Aug 5, 2015, 10:55:43 AM8/5/15
to golang-nuts
An obvious question: Why not use GDB? Or improve GDB's support for Go?

Damian Gryski

unread,
Aug 5, 2015, 11:07:27 AM8/5/15
to golang-nuts


On Wednesday, August 5, 2015 at 4:55:43 PM UTC+2, Bruno Medeiros wrote:
An obvious question: Why not use GDB? Or improve GDB's support for Go?

Chris Hines

unread,
Aug 5, 2015, 11:23:54 AM8/5/15
to golang-nuts
Derek also talked about his reasons at GopherCon. Video here: https://www.youtube.com/watch?v=InG72scKPd4

Haddock

unread,
Oct 1, 2015, 3:51:44 AM10/1/15
to golang-nuts
Delve is really what Go needed. Awesome! Are there some plans to support remote debugging? I don't even know enough about Go to be able to say whether that is feasible at all. But it would be really needed.

Thanks, Haddock

Giulio Iotti

unread,
Oct 1, 2015, 4:23:21 AM10/1/15
to golang-nuts
On Thursday, October 1, 2015 at 9:51:44 AM UTC+2, Haddock wrote:
Delve is really what Go needed. Awesome! Are there some plans to support remote debugging? I don't even know enough about Go to be able to say whether that is feasible at all. But it would be really needed. 

AFAIK Delve is a client/server over HTTP: remote debugging should work out of the box.

dlv debug -headless -listen :8181 ... # Start the debugger server
dlv connect localhost:8181 # Connect to debugger server

-- 
Giulio Iotti 

xn0...@gmail.com

unread,
May 2, 2016, 8:04:58 PM5/2/16
to golang-nuts
SWEET!!!
Patrick your dlv slogan should be:
"Delve debuging Go the right way "
Reply all
Reply to author
Forward
0 new messages