permalink Arrow_down_16x16
  • (debug-repl)
  • (debug-repl form)
Starts a REPL with the local bindings available.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/debug.clj:56 top

(defmacro debug-repl
  "Starts a REPL with the local bindings available."
  ([]
     '(debug-repl nil))
  ([form]
     `(let [counter# (inc-counter)
            eval-fn# (partial eval-with-locals (local-bindings))]
        (try
         (binding [level (inc level)]
           (clojure.main/repl
            :prompt #(print (str "dr-" level "-" counter# " => "))
            :eval eval-fn#
            :read dr-read
            :caught caught))
         (catch Exception e#
           (if (= e# quit-dr-exception)
             (if-let [new-form# (.nextElement quit-dr-exception)]
               (eval-fn# new-form#)
               (eval-fn# ~form))
             (throw e#)))))))
Vars in clojure.contrib.base64/debug-repl: defmacro = apply binding concat if-let inc let list partial print seq str vector repl
Used in 0 other vars

Comments top

No comments for debug-repl. Log in to add a comment.