Tagged: Ritz

Clojure Debugging ’13: Emacs, nREPL, and Ritz

[NOTE: The release of cider deprecates much of the content here.  I will post an update on Clojure Debugging ’14 early in the near year]

I’m ramping up for a new set of development projects in 2013 and 2014.  My 2010 era setup with slime and swank-clojure is unlikely to remain a viable approach throughout the project.  I’ve decided it is time to join the nREPL community as well as take advantage of some of architecture innovations there which may make it easier to debug the distributed systems I’m going to be working on.

Features I’m accustomed to from common lisp slime/swank:

  • Code navigation via Meta-. and Meta-,
  • Fuzzy completion in editor windows and the repl
  • Documentation help in mini-buffer
  • Object inspector.  Ability to walk any value in the system
  • Walkable backtraces with one-key navigation to offending source
  • Evaluate an expression in a specific frame, inspect result
  • Easy tracing of functions to the repl or a trace buffer (in emacs)
  • Trigger a continuable backtrace via watchpoint or breakpoint

Only the first three of these features is available in the stock nrepl.  The rest of this post will discuss how to setup a reasonable approximation to this feature set in Emacs using nREPL middleware providers as of May 2013.

Continue reading