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
Support going to the code #13
Comments
As a first step, we could just include the file name and line number of the source code. |
I think file+line information is only available from the parse data? This seems incompatible with the way we instrument now. If we changed to instrumenting the parse data, we could switch to instrumenting comments (#35), this gives true zero-cost debugging. Would you support that? |
If the installed package has source references, then there is file + line information, I think. |
Yes, we have parse data. But if we walk the language tree, we don't get the source references for every token, AFAICT. Do we need to change pkgload? |
E.g. covr walks the language tree and uses the source refs to for every expression, so I think it is possible to do it. Might not be worth it, though. |
Yeah, covr sees internal srcrefs for calls, and can impute them for control flow constructs -- we have strings. But we could search for these strings in the parse data! Not sure about Still, instrumenting the parse data and using comments would be much better. |
We could add ids to the debug messages somehow, and then jump to their place in the code quickly, either just showing the code on the screen like
tracer
, or jumping there in RStudio.The text was updated successfully, but these errors were encountered: