-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
[Feature Request] Add Debugger functionality #469
Comments
Very good that you bring this up and provide a starting point for collecting information about how to proceed with this. I have since I started with Calva always thought I should port the VSCode Clojure Debug code over. Do we know if the There is also a another, probably more tricky, way: Using the Java Debugger extension. It would be more like Cursive does it. This would be totally Clojure specific, of course, but that might be compensated by that ClojureScript debugging might become quite easy to achieve through... ... the JavaScript debugger. This almost works already today. But there has been something lacking with the source maps. I read something the other day that this might have been improved in later shadow-cljs versions. We should experiment with that some. |
This is also at the top of my wish list! This would be a very powerful feature to get working, coming from .NET I feel very limited without it. |
Being able to step through an expression as it evaluates would be a gamechanger for me - right now I'm |
Thanks @kstehn for providing that info. I've reviewed it all as well as many other things to wrap my head around debugging in Clojure in general and debugging as it relates to vs code. There are two ultimate goals for debugging - trace and step. I've outlined my notes / thoughts below. For trace debugging:
For step debugging:
I'll be working on likely both of these things over the next few months - step debugging being the more in-demand feature it seems. If anyone has insights they'd like to share I'm always all ears. The real work in all this seems to be wiring up all the pieces, and making it work well with vs code. |
Sounds reasonable. |
I think the title itself says it all.
So i just want to list somethings i found out that might make it easier for someone to tackle this.
First the easy part (VSCode):
Here is the documentation for a debugger extension: https://code.visualstudio.com/api/extension-guides/debugger-extension
I think calva should be able to implement the Debug Adapter protocol.
I guess we can have a look at this code how to actually do it: https://github.com/indiejames/vscode-clojure-debug/blob/master/src/clojureDebug.ts
The harder part is the nrepl side (only when not everything is included in clojureDebug):
For that part i only found the cider-nrepl/debug.clj source code: https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/debug.clj
Sadly i didnt find any documentation how the messages should look like.
Maybe we can find this out with the clojureDebug.ts or based on the emacs implementation (here).
The text was updated successfully, but these errors were encountered: