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

Stepping into functions in other files #38

Open
nfoti opened this issue Mar 4, 2013 · 3 comments
Open

Stepping into functions in other files #38

nfoti opened this issue Mar 4, 2013 · 3 comments

Comments

@nfoti
Copy link
Contributor

nfoti commented Mar 4, 2013

Adding the ability to jump into functions in other files (or included modules) would be incredibly useful. I'm thinking a way to do it would be when we hit a :call node in the AST to look for the function definition in all source files that have been included or required (including the current file) and insert the AST for the function definition into the decorated AST and replace the original :call to jump to the injected function definition rather than the compile code.

Once could even probably step into functions in modules by searching through the .julia directory.

Does this sound "easily" doable?

Just wanted to throw this out there as another idea that would make the debugger really useful for julia users.

Thanks

@toivoh
Copy link
Owner

toivoh commented Mar 5, 2013

I'll have to give this one some thought. I agree that it would be an incredibly useful feature (and it might be the one that I've got most requests for, so far). I also think that one of the most important qualities of a debugger is that it should never change how the code behaves, and I am not sure yet if this feature can be implemented in a foolproof way.

I should add that the debugger will step into other functions and files, as long as the target is wrapped in a @debug block as well. Se also #19, where the idea was to be able to wrap code in a @debuggable macro to save the AST so that it could be instrumented later. If I attempt something like this, that is probably where I would start.

@nfoti
Copy link
Contributor Author

nfoti commented Mar 5, 2013

No big deal. I thought I had tried stepping into a function in another
file wrapped in @debug, but I'll try again.

Any thoughts on context printing from issue #37?

On Tue, Mar 5, 2013 at 1:12 AM, toivoh [email protected] wrote:

I'll have to give this one some thought. I agree that it would be an
incredibly useful feature (and it might be the one that I've got most
requests for, so far). I also think that one of the most important
qualities of a debugger is that it should never change how the code
behaves, and I am not sure yet if this feature can be implemented in a
foolproof way.

I should add that the debugger will step into other functions and files,
as long as the target is wrapped in a @debug block as well. Se also #19#19,
where the idea was to be able to wrap code in a @debuggable macro to save
the AST so that it could be instrumented later. If I attempt something like
this, that is probably where I would start.


Reply to this email directly or view it on GitHubhttps://github.com//issues/38#issuecomment-14425262
.

@nfoti
Copy link
Contributor Author

nfoti commented Mar 5, 2013

You're right, stepping into functions in other files does work as long as
they're wrapped in @debug.

With the context printing (using a slightly modified parser) the debugging
experience is quite nice. No rush, but when you have a chance, let's
figure out what the best course of action is for this. I determined that
the julia parser only returns file information for lines in functions. One
can fix this by modifying a few lines in the parser scheme file, but we
should probably talk to the core guys to make sure it's done in an
efficient way.

Thanks, sorry to hijack this issue.

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

No branches or pull requests

2 participants