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

(breakpoint mode) compile the code behind breakpoint #298

Closed
aminya opened this issue Jul 4, 2019 · 6 comments
Closed

(breakpoint mode) compile the code behind breakpoint #298

aminya opened this issue Jul 4, 2019 · 6 comments

Comments

@aminya
Copy link

aminya commented Jul 4, 2019

I am not how practical this is or if it is done already
To speed up the debugging, is it possible to compile the code before the breakpoint specified by line number? and if the breakpoint is inside a control flow (such as if, while, for, etc.) the compilation should be done until before the control loop.

Image

I am assuming to achieve this, a new debugger mode which is only meant for hitting the breakpoints is needed.

@KristofferC
Copy link
Member

Breakpoints needs to be addable, removable, modifiable while the code is running, otherwise you could just insert some hook directly into the source code

Please see #204 for some more discussion about different approaches to improving performance.

@aminya
Copy link
Author

aminya commented Jul 4, 2019

@KristofferC Well, that is exactly what I want. Just to check the values of the variables inside workspace (especially if the code is inside a function).
As I said, this is going to be a new mode of debugging just for breakpoints. After checking the values of the variables, if users press continues (they might remove the breakpoint), the debugger should scan the rest of the code to see if there are new breakpoints there.
There is a run in compilation mode option for debugging inside Atom, but it does not work for breakpoints, however, I am trying to give a solution to add compilation partially.

@KristofferC
Copy link
Member

Just to check the values of the variables inside workspace (especially if the code is inside a function).

A feature could be added to Debugger.jl / Juno debugger that allows you to insert some macro and gives you an interactive thing with the local variables (using Base.@locals). It won't be much more than a pretty printer though since you can't do any stepping etc. But if that is what you need, it should be fairly easy to implement,

@aminya
Copy link
Author

aminya commented Jul 4, 2019

As I said, ideally, after checking the values of the variables, if users press continues, the debugger should scan the rest of the code to see if there are new breakpoints there.
Also, the user may want to run some mini test codes using the variable values until that moment.

Isn't it possible to compile part of the code and call the interpreter/debugger after that?

@pfitzseb
Copy link
Member

pfitzseb commented Jul 5, 2019

Feel free to give #297 (comment) a go, we might get around to adding that to Debugger.jl/Juno at some point.

@aminya
Copy link
Author

aminya commented Jul 20, 2019

Feel free to give #297 (comment) a go, we might get around to adding that to Debugger.jl/Juno at some point.

@pfitzseb Thank you! should I create an issue there? or you can move this to that repository?

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

3 participants