debug-repl
debug-repl copied to clipboard
Made debugging available globally, without a need to require in every namespace
It is really inconvenient having to require com.gfredericks.debug-repl in every namespace while you debugging, especially given usually one has debug-repl in their user profile, not in a project definition, so having that require
s permanently in every namespace in most cases won't work.
This patch adds break!
, unbreak!
, unbreak!!
and catch-break!
to clojure.core before nrepl middleware is installed.
I chose immediate global installation rather then on-demand global installation because functions/macros will be available only to namespaces that are defined afterward unless those namespaces are manually reloaded (or unless you call (use 'clojure.core :reload)
when in that namespace).
It doesn't modify any existing functions in clojure.core, only adds new ones, so it should be safe. Given debug-repl is a development tool I think it's ok to tinker with internals a little when it will lead to better development experience.