Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: tools for more readable stacktraces #25736

kingishb opened this issue Jun 5, 2018 · 2 comments


Copy link

commented Jun 5, 2018

As a Go beginner, I've benefitted a lot from using visual aides to assist reading dense panics and stacktraces. In particular, @maruel's panicparse has been helpful for reading panics while I work (even though the information is basically the same). Example from the project's README:
screenshot from 2018-06-05 11-01-43
screenshot from 2018-06-05 11-01-55

This style of tool/output seems like it could be useful in the Go standard distribution; as a command line tool in the family of debugging tools, as a toggleable flag somewhere to pretty-print panics, or maybe as inspiration for some kind of dense tab-delimited panic format.

@gopherbot gopherbot added this to the Proposal milestone Jun 5, 2018

@gopherbot gopherbot added the Proposal label Jun 5, 2018


This comment has been minimized.

Copy link

commented Jun 5, 2018

Thanks for the reference. :) Some of the reason I didn't push this into the stdlib is that panicparse does a fair amount of processing to:

  • Read the source files and figure out the types on the stack*
  • Find similar goroutines and merge them into a common signature
  • Use colored outputs

All these cannot be safely done from a panic handler inside the panicking process, as the amount of processing must be kept to a minimum, which includes trying to even allocate memory.

  • This could probably be figured out by parsing the binary itself, but I never tried. It'd be much smarter.

@mvdan mvdan added the Go2 label Jun 5, 2018


This comment has been minimized.

Copy link

commented Sep 25, 2018

Sounds like a good idea, but this can be done independently of any Go 2 effort, so removing the Go 2 label. This should start as a third-party or tool, and then we can see whether it makes sense in the Go standard library. Putting this proposal on hold until there is a tool available.

@ianlancetaylor ianlancetaylor changed the title proposal: Go 2: tools for more readable stacktraces proposal: tools for more readable stacktraces Sep 25, 2018

@ianlancetaylor ianlancetaylor added Proposal-Hold and removed Go2 labels Sep 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
5 participants
You can’t perform that action at this time.