Hacker News new | past | comments | ask | show | jobs | submit login
Clojure Debugging: Emacs, nREPL, and Ritz (ianeslick.com)
88 points by llambda on May 18, 2013 | hide | past | favorite | 8 comments



To get most of the benefits of this in Vim, try Vim fireplace.

https://github.com/tpope/vim-fireplace

Everything you want but the debugger. You'll have to get Ritz on its own for that.

I usually develop with clojure code on Vim in one terminal window and a repl running in another terminal. It's really nice to have them working together in the background with nRepl and Fireplace. I wrote a nice hack so that line numbers and file names in stack traces are useful in functions I've updated in my files over the nRepl transport.


Vim fireplace is fantastic, kudos to tpope for putting that together. I haven't tried debugging with it yet, but it sounds like it should be pretty doable.


Great write up. I use IntelliJ for most of my Clojure dev work, but I do like nREPL and I am using Ian's setup notes to improve my setup. BTW, I started using Clojure years ago because of Ian's influence - that is what I used on his projects. I used to be firmly in the Common Lisp camp (and used to use Ian's Elephant CLOS database wrapper) but I have mostly stopped using Common Lisp and Scheme in favor of Clojure.


I never start lein repl at the command line anymore, M-x nrepl-jack-in is sufficient. Does lein repl give you something extra?


I do ALOT of remote diagnosis / inspection / debugging. 'lein repl' just makes my local workflow similar to my remote workflow (via ssh tunnels). I'll second the value of having a separate buffer with all the tracing data dumped out to it vs. showing up in Emacs.


I tend to start the repl at a command line and then connect in. That way my repl session isn't tied to the emacs process, and if I do something stupid in emacs I can disconnect and reconnect without issue.


If you use lein repl and emacs crashes, your repl will stay up and you can reconnect to the same session.

Yeah, I crash emacs a lot...


Also, if you run a command that prints a lot to stdout (eg tracing) it will make emacs unhappy. That works much better in the lein repl terminal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: