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

Trace logging #9

Open
CAD97 opened this issue Nov 10, 2018 · 2 comments
Open

Trace logging #9

CAD97 opened this issue Nov 10, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@CAD97
Copy link
Collaborator

CAD97 commented Nov 10, 2018

We should offer a feature (trace, probably, or maybe log) that adds a runtime dependency on log and adds trace! macros to the conversion process. This should help with debugging without having to add manual implementations of FromPest all over the place to trace execution.

@CAD97 CAD97 added the enhancement New feature or request label Nov 10, 2018
@dragostis
Copy link

This is something that should probably add to the pest crate as well. Although, I'm not quite sure whether this would be preferable over the debugger work that's already started.

@CAD97
Copy link
Collaborator Author

CAD97 commented Nov 10, 2018

For pest proper, having a debugger is a huge quality of life thing. For a from-pest conversion, though, I don't know whether a dedicated debugger is practical.

If you're using a tui debugger, I think it should be possible to put breakpoints on <Node as FromPest>::from_pest, though I have to admit ignorance here. I both am spoiled by the IntelliJ Java visual debugger and on Windows, so I have never learned how to use a textual debugger (and really have no desire to).

printf debugging is basic, but simple. Once I can actually use a debugger on Windows (I have a JetBrains license so can use CLion, but have failed multiple times to set it up so far), maybe I can see about improving debuggability that way. But due to the distributed manner of pest-ast (annotations on individual types instead of one localized source of truth), a VM debugger doesn't seem practical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants