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
cmd/trace: debugging support like PySnooper? #31847
Comments
Probably the closest equivalent in the Go standard library is the Please have a look at that package and let us know which (if any) of your use-cases it doesn't address well. |
@bcmills Thanks for the reply. Yeah I did check out |
Since Go is a compiled language, something like that would presumably require deep compiler support. A project that large probably ought to go through the proposal process, in which case it would need a lot more detail: what should the API look like, how would we implement it, and how important is the underlying use-case in relation to the other large projects in the issue backlog? (Or, if you don't want to work it out in that much detail, a description of the general use-case would probably be more helpful as an experience report instead.) |
Cool. I will write something when I have time. Thanks for the info here. |
I'll close this issue for now, but do feel free to file a proposal if/when you're ready. 🙂 |
@bcmills I made a draft here: https://github.com/guanw/go-proposal/blob/master/proposal.md. Could you let me know if it's unclear/incomplete and maybe link it to golang's experience report? Thanks. |
@guanw thanks, but more detail would still be helpful. Per http://golang.org/wiki/ExperienceReports:
|
Updated. Please check again. Thanks. |
Added to the wiki. Thanks! |
This isn't an issue regarding golang itself but would be a nice addition to have.
I notice in Python now there's a really nice debugging library PySnooper. It uses notion of trace from
sys.settrace
to fire up callback when codes are running so you could monitor/log everything ongoing.Golang already has a notion of trace but the meaning is bit different from what python had here. I think a tool similar to PySnooper would be particularly helpful for new developers who's learning Golang. Since you are much more experienced with Golang than I am, I'm wondering if you guys think it's a good idea to make a similar module and if so what are some of the existing modules that could help achieve the goal here?(e.g something similar to
sys.settrace
that provides a nice callback) Thanks in advance for any ideas and recommendations here!The text was updated successfully, but these errors were encountered: