Skip to content

Instantly share code, notes, and snippets.

@visibletrap
Created October 29, 2015 08:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save visibletrap/bdf16dd5596c9a72ec73 to your computer and use it in GitHub Desktop.
Save visibletrap/bdf16dd5596c9a72ec73 to your computer and use it in GitHub Desktop.
A convenient function to peek Clojure's stack trace at a certain position in code
(defn stack-traces []
(->> (Thread/currentThread)
(.getStackTrace)
(map (juxt #(.getClassName %) #(.getMethodName %) #(.getLineNumber %)))
(map #(clojure.string/join ":" %))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment