🤔 flowstorm

FlowStorm is a time-travelling debugger for clojure.

IMO, Clojure has the best development experience with its REPL-driven workflow. FlowStorm makes it even better.

Most notably:

My recommended set-up is to create a global lein profile and/or global deps alias, so that enabling flowstorm on any project is painless:

Deps

In ~/.clojure/deps.edn:

{:aliases
 {:flowstorm
  {:classpath-overrides {org.clojure/clojure nil}
   :extra-deps {com.github.flow-storm/clojure {:mvn/version "RELEASE"}
                com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}
   :jvm-opts ["-Dflowstorm.startRecording=false"
              "-Dclojure.storm.instrumentEnable=true"
              "-Dclojure.storm.instrumentAutoPrefixes=true"]}}}

Example: clj -A:flowstorm -M:repl (if you have a repl alias)

Lein

In ~/.lein/profiles.clj:

{:flowstorm
 {:dependencies [[com.github.flow-storm/clojure "RELEASE"]
                 [com.github.flow-storm/flow-storm-dbg "RELEASE"]]
  :exclusions [org.clojure/clojure]
  :jvm-opts ["-Dflowstorm.startRecording=false"
             "-Dclojure.storm.instrumentEnable=true"
             "-Dclojure.storm.instrumentAutoPrefixes=true"]}}

Example: lein with-profile +flowstorm repl

Usage

Start your REPL with the FlowStorm profile (see examples above). In the start-up log, you should see:

Storm instrumentation set to: true
ClojureStorm adding instrumentation auto prefix myproject

When the REPL is ready, you can open the FlowStorm UI by evaluating :dbg in the REPL.

In the FlowStorm UI open, hit the record button, back in your editor, evaluate some code, then view the code flow back in the FlowStorm UI. Check out the videos and the docs to learn what you can do in the FlowStorm UI.

https://gist.github.com/rafd/663528f4d0814bb0fb6d683c15c78365

2024-06-13