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

Making 'enter' easier #113

Open
kuanxu opened this issue Feb 7, 2018 · 8 comments
Open

Making 'enter' easier #113

kuanxu opened this issue Feb 7, 2018 · 8 comments

Comments

@kuanxu
Copy link

kuanxu commented Feb 7, 2018

Currently, to ‘enter’ a line to begin debugging, one has to

  1. run the file once first,
  2. then add the @enter macro manually at the beginning of the line,
  3. If this is a line where value assignment is involved, one also has to remove the variable on the left-hand side as well as the equal sign.

Any of these can significantly drag the speed of the debugging work, let alone the combination, and it is very very error-prone as one has to modify the code unnecessarily. So it'll be great that debugging can start as simply as in Matlab - one can simply start debugging from the first line of the code or the line where the cursor is by just clicking one button. In GDB, this can be done by run (if I recall correctly).

Of course, getting rid of the three steps above is beyond just the Juno wrapper for the debugger, but the design of the debugger too. So I'm filing a ticket too here.

@pfitzseb
Copy link
Member

pfitzseb commented Feb 7, 2018

One thing that could be implemented on the Juno side: We could allow selecting a function call and adding a "Step into selected function call" in the context menu (and as a command, obviously -- maybe even a toolbar button), which would then call @enter selected_function_call(...) internally.

Do you think that is sufficiently convenient? ;)

@pfitzseb
Copy link
Member

pfitzseb commented Feb 7, 2018

Actually, now that I'm thinking about this -- we could even have a small toolbar pop up whenever you select a valid function call and offer some options about what you could do with it: Profile it, step into it, benchmark it etc.

@kuanxu
Copy link
Author

kuanxu commented Feb 7, 2018

@pfitzseb That's a neat idea!! I really love it.

In the meanwhile, I still wish that we can start to traverse an file from the very beginning, starting by a simple button click. People do this when trying to go through a file to understand the working/logical flow. How do you think?

@pfitzseb
Copy link
Member

pfitzseb commented Feb 7, 2018

Are you talking about stepping through a "top-level" file? If so then you could just use inline evaluation (with Shift-Enter) to quickly step through it.

@kuanxu
Copy link
Author

kuanxu commented Feb 7, 2018

Yes and no. I meant stepping through a "top-level" file but being able to step into lower levels whenever I want to.

I just tried Ctrl-Shift-Enter but nothing happened. I must have missed something. Can you elaborate a little?

@pfitzseb
Copy link
Member

pfitzseb commented Feb 7, 2018

I see, makes sense. I don't think we can easily do that with the debugger though -- my proposal above is probably the best thing possible for now.

Ctrl-Shift-Enter should be Shift-Enter above, which evaluates the current block and steps to the next one.

@kuanxu
Copy link
Author

kuanxu commented Feb 7, 2018

Thanks. Shift-Enter works. But it does invoke the debugger. I can only see the function which is to be called next. I wish I could, at that point, press F11 to get into the called function.

@daravi
Copy link

daravi commented Sep 13, 2019

It would be great if there was a Start Debugging option that would just start at the top of the active file.

It could then be configured (in preference) to stop at entry (like enter) or run until the first breakpoint (like run). We could also add Debug Block to parallel Run Block if there is demand for it.

Afterwards it would also make sense to also add a "Reset" button to the debug bar to restart the debugging session to its initial state.

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

No branches or pull requests

3 participants