padreati / rapaio-jupyter-kernel

Java jupyter kernel
MIT License
41 stars 4 forks source link

debugging support #47

Open clankill3r opened 5 months ago

clankill3r commented 5 months ago

I guess it's easier to post ideas on the issues page then to implement them...

Ok, it would be nice to some day have support for a debugger.

https://jupyterlab.readthedocs.io/en/stable/user/debugger.html https://microsoft.github.io/debug-adapter-protocol/

padreati commented 4 months ago

Hi,

There are multiple things to make that work. And, of course, plenty of work. There is the messaging protocol that you mention it, probably make the engine to work in a separate process (I am not sure that debugging works in the same process).

But there is something more subtle, which I don't figure out yet. This is how I identify the breakpoints inside jshell code snippets. I can take info from notebook, break it into snippets and evaluate it separately. But I am afraid I don't have a clear process in my head on how to identify those in jshell. Another approach to that would be to allow breaking points only on lines of code, and when I run a cell with code, break it into snippets and manage to pause the execution myself. That would not require a separate process, but requires probably more work on what to find pieces to display to the user.

I will take a deeper look on that and do some experiments. If I find a way I could start to do that if I find enough contiguous time.

Thank you for ideas and feedback. Best regards, Aurelian