Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Support Debugging #21

Open
pzurek opened this Issue · 14 comments

6 participants

@pzurek

Breakpoints, code stepping, the works...
That would be awesome, please.

@eliseosoto

From @joefitzgerald on Reddit:

Yep, it's possible - we'd need to integrate with GDB and also provide the ability to launch a go program, a test, or all tests

@joefitzgerald

"The state of gdb support"
https://groups.google.com/forum/m/#!topic/golang-dev/UiVP6F-9-yg/discussion

This is interesting for a few reasons:

  1. The golang team do not believe gdb is the future of debugging for go
  2. There is no proposed alternative

At first glance, I think this prioritizes gocode support above gdb support. But more fundamentally, it makes me question whether it's worth expending the time integrating gdb at all.

I think we all agree that it would be very much desirable to have debugging, the ability to set breakpoints, inspect locals and watches, and step through code. On the one hand, the lack of it forces some positive behavior (e.g. more tests!), but on the other hand it can create negative behavior (fmt.Println(everything)).

@joefitzgerald joefitzgerald added this to the 3.0 milestone
@joefitzgerald

https://code.google.com/p/go/issues/detail?id=7471 is also worth a read, and raises the possibility for lldb to be a path forward. Regardless, there's still no decision or clear direction from the team.

@pzurek

I would say gocode definitely before this. For gocode there is one clear path.
The debugger support seems much less defined at the moment. I personally had my hopes raised by renewed activity in the Ogle repo: https://code.google.com/p/ogle/source/list.

@joefitzgerald joefitzgerald changed the title from Debugger support to Debugger Support
@joefitzgerald

Update post-gophercon. There is no clarity on this issue. gdb support is likely to wane over time, and I'm not aware of any concrete plans / a path forward with a specific tool.

If someone wants to spend the time to integrate gdb, I will accept a good quality contribution – but I am unlikely to invest the time to do this myself.

@kristofer

is a debugger not real coding? or do the golang cognoscenti never create bugs in their code?

wow. I'm somewhat stumped.

@joefitzgerald

I hope I am not considered cognoscenti :wink:. The takeaway from my last comment should be "Joe isn't sure of the direction the golang core team wants to take with regard to debugging, so is hesitant to invest time integrating a specific debugger" rather than "Joe doesn't like debuggers".

I see great value in debuggers, and spend a lot of time in one debugging this very package :grimacing:.

Edit: Also, once we've drained all the other issues in the backlog, if this is the only one remaining I'm sure we'll end up working on it. Autocomplete and others are just higher priority now.

@emicklei

How about integrating hopwatch ? It is hardly a debugger but you can set breakpoints to inspect stack and program state. It requires modification of your source but the Atom package might help in organizing this. https://github.com/emicklei/hopwatch

@nkev

There seem to be a few debuggers popping up by people tired of waiting for the GO team:

https://github.com/derekparker/delve
https://github.com/gostart/debug
https://github.com/simon-whitehead/go-debug

The first one seems serious and active. I wonder if it can be integrated into Atom as a GUI debugger?

@joefitzgerald

Just to reiterate: I'm always open to possibilities in this issue. If someone wants to put together a pull request for this functionality I would gladly accept it.

@joefitzgerald joefitzgerald removed the question label
@joefitzgerald joefitzgerald added this to the Unscheduled milestone
@nkev

I think #2 Gocode integration is more pressing...

@joefitzgerald

Yes, it keeps coming up over and over in forums like Reddit, Hacker News, etc. Lack of gocode is causing some people to go back to other tools.

@joefitzgerald joefitzgerald modified the milestone: 4.0, Unscheduled
@joefitzgerald

I would like to see this done via an integration with godebug. If anyone would like to contribute I would gladly accept a PR for this, otherwise I will get to it after I have cleared the current backlog of PRs.

@joefitzgerald joefitzgerald changed the title from Debugger Support to Support Debugging Via godebug
@nkev

@joefitzgerald https://github.com/derekparker/delve is all the rage at the moment. It even has an API for IDE's now. The author, Derek Parker is speaking (about it I presume) at Gophercon this year.

@pzurek pzurek changed the title from Support Debugging Via godebug to Support Debugging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.