Works only in Chrome
- Not guaranteed to work 😜
- Links to source code in browser's console are not interactive
- No async stack traces
Enable Custom Formatters in Chrome (see how)
Serve from public
dir and open browser console
clj -m cljs.main -co prod.cljs.edn -c test.core
or
clj -m cljs.main -co dev.cljs.edn -c test.core
or
clj -m figwheel.main -b dev -r
- See bootstrapping code in src/test/preload.cljs after line 46
- Or add
:preloads [test.preload]
to compiler options
{
message: "{error.message}",
stack: "{error.stack}",
linesInFrame: 3, // (target line + 2 sinbling lines)
maxLines: 10, // max number of lines to print
excludes: [], // filters out stack frames based on file path regex [".*\/cljs\/core.cljs$"]
mode: "expanded" // "simple" | "expanded" (see screenshot in the beginning of the document)
}
- Install NPM deps
- Run
node server/index.js --port {PORT}
- Add this script to your HTML
<script src="http://localhost:{PORT}/runtime"></script>
to connect to server