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

idea: possible to add debugger to IJava on Google Colab? #153

Open
david-romano opened this issue Feb 1, 2024 · 3 comments
Open

idea: possible to add debugger to IJava on Google Colab? #153

david-romano opened this issue Feb 1, 2024 · 3 comments

Comments

@david-romano
Copy link

david-romano commented Feb 1, 2024

Hi, I teach a remote introductory programming course in Java and had run into a wall because some of my high school students' schools blocked access to any cloud-based IDEs I found. That is, until I found that IJava could be used in a Google Colab Jupyter notebook, so thank you for that! The only — hopefully, temporary — downside is that I don't know of any way to add a debugger they can use in a notebook. I know that pdb abd ipdb seem to work for python, but I don't know enough about the magic that went into making IJava to know whether there's a simple way to add a debugger to the mix. Any thoughts? And thanks again for IJava and the recipe for adding it as a Google Colab kernel, @SpencerPark!

@david-romano david-romano changed the title idea: possible to add debugger to IJava? idea: possible to add debugger to IJava on Google Colab? Feb 1, 2024
@SpencerPark
Copy link
Owner

Caught me at a good time, recently starting looking into this myself as well (SpencerPark/jupyter-jvm-basekernel#29 for protocol additions in 5.5). The hope is that we can reuse most of the java DAP implementation from vscode, forwarding messages from/to the relevant Jupyter channels. Then it is just a matter of implementing some the jupyter specific extensions to that protocol if all goes well.

This will also require some refactoring on our side in actually running the kernel code in a separate jvm with the jdi enabled (IJava currently executes it in-process) but that is how jshell typically runs code so I don't see too many roadblocks there.

Maybe this all working smoothly is just wishful thinking, but that's the plan so far, will see how much progress the weekend brings. Also always happy to hear this project is being used for teaching, thanks for that :)

@posenato
Copy link

posenato commented Feb 2, 2024

@SpencerPark
Even at the University of Verona (Italy), I use Java to teach programming to bioinformatics students. :-)

@david-romano
Copy link
Author

Caught me at a good time, recently starting looking into this myself as well (SpencerPark/jupyter-jvm-basekernel#29 for protocol additions in 5.5). The hope is that we can reuse most of the java DAP implementation from vscode, forwarding messages from/to the relevant Jupyter channels. Then it is just a matter of implementing some the jupyter specific extensions to that protocol if all goes well.

This will also require some refactoring on our side in actually running the kernel code in a separate jvm with the jdi enabled (IJava currently executes it in-process) but that is how jshell typically runs code so I don't see too many roadblocks there.

Maybe this all working smoothly is just wishful thinking, but that's the plan so far, will see how much progress the weekend brings. Also always happy to hear this project is being used for teaching, thanks for that :)

Great! It'll take a bit for me understand the details of what you're saying (all new territory for me), but I'm glad it's on the wishlist.

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