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

Juno integration #18

Open
timholy opened this issue Aug 19, 2018 · 7 comments
Open

Juno integration #18

timholy opened this issue Aug 19, 2018 · 7 comments

Comments

@timholy
Copy link
Owner

timholy commented Aug 19, 2018

If @pfitzseb or other Juno users & developers find Rebugger useful, then there may be a number of things we can do to get the two working together. The separation of files in src deliberately split the debugging logic from the REPL user interface. (If necessary we should split them into two separate packages; I'm happy to make changes here to help facilitate their interaction.) To allow the debug logic to be used from Juno, then integration might consist of the following:

  • support marking in the portion of prepare_caller_capture! that is used to select the stepin expression. This would be useful even for the REPL to delimit the start and stop of the expression (where to begin and end parsing is sometimes ambiguous), but for Juno a very natural interface would be for the user to select the region with the mouse. Julia's IOBuffer supports both point and mark, so it would be easy to communicate the selected region from Juno to Rebugger.
  • change stepin keybinding to something that works in Juno. Alt-Shift-Enter was indeed inspired by Juno's Ctrl-Enter (and means something similar, "eval, but with a stepin"), but sadly it doesn't work. Of course really Juno would need to handle the key binding itself, mimicking at least some aspects of ui.jl's version of stepin.
  • for stacktrace capture, Juno could call capture_stacktrace(mod, expr) and collect the returned uuids. Then presumably using a dropdown Juno could allow any of these to be tested.

As is presumably obvious, most of the work would need to be done on the Juno side. I've been meaning to learn more about Juno's internals so would be happy to help out if necessary and as time permits.

@adamryczkowski
Copy link

adamryczkowski commented Sep 4, 2018

Great package! Do you know by chance how to use it on Ubuntu 16.04 or 18.04 (if it is possible at all, that is). In particular, what is the Meta key? Left Alt+e brigs terminal menu, esc + e just inserts e and ctrl + e moves cursor to the end of the line.

@timholy
Copy link
Owner Author

timholy commented Sep 4, 2018

You probably have shortcuts defined in your window manager. Which one are you using? Works on Kubuntu. There are also docs on changing them.

@adamryczkowski
Copy link

At the moment old good Ubuntu 16.04. After digging further I believe the meta is Left Alt.

What set me off is the phrase from the manual:

Meta reliably maps to Esc, and if using Esc you should hit the two keys in sequence rather than simultaneously (...)

Do you mean, that one can modify OS to map Meta to Esc and have more reliable experience, or that in most OSes Meta is usually mapped to Esc (one can find Meta mapped to Esc quite reliably on most systems)?

Anyway, I still cannot make it work. I do not believe Alt+e is assigned by the WM on Ubuntu.

@timholy
Copy link
Owner Author

timholy commented Sep 4, 2018

Clearly I should modify that line. I simply meant that Alt-e works on fewer platforms (e.g., OSX) than Esc-e. Until now I didn't realize that any didn't work with Esc-e.

@timholy
Copy link
Owner Author

timholy commented Sep 4, 2018

Anyway, I still cannot make it work. I do not believe Alt+e is assigned by the WM on Ubuntu.

Hmm, maybe the terminal program itself assigns this behavior?

If you can't figure out how (or choose not) to configure this away, just pick something you like and follow these instructions in the docs.

@timholy
Copy link
Owner Author

timholy commented Sep 4, 2018

@timholy
Copy link
Owner Author

timholy commented Sep 4, 2018

Let me know if that works and if so I will add this information to the documentation.

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