Skip to content

cmd/trace: debugging support like PySnooper? #31847

@guanw

Description

@guanw

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions