This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Slightly enhanced version of Alex Osborne's debug-repl (http://gist.github.com/252421) | |
;; Typing () quits the debug REPL, making it possible to continue without terminating the | |
;; input stream by typing Ctrl-D. | |
;; Inspired by George Jahad's version: http://georgejahad.com/clojure/debug-repl.html | |
(ns debug | |
[:require clojure.main]) | |
(defmacro local-bindings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Inspired by George Jahad's version: http://georgejahad.com/clojure/debug-repl.html | |
(defmacro local-bindings | |
"Produces a map of the names of local bindings to their values." | |
[] | |
(let [symbols (map key @clojure.lang.Compiler/LOCAL_ENV)] | |
(zipmap (map (fn [sym] `(quote ~sym)) symbols) symbols))) | |
(declare *locals*) | |
(defn eval-with-locals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; even more enhanced version with that allows ret val override and better prompt | |
;; Slightly enhanced version of Alex Osborne's debug-repl (http://gist.github.com/252421) | |
;; Typing () quits the debug REPL, making it possible to continue without terminating the | |
;; input stream by typing Ctrl-D. | |
;; Inspired by George Jahad's version: http://georgejahad.com/clojure/debug-repl.html | |
(ns clojure.contrib.debug | |
[:require clojure.main]) |