Browser DevTools
The Google Chrome DevTools help you understand what is happening when you run the JavaScript code created from your ClojureScript code.
- Online Course: CodeSchool - Discover DevTools - sponsored by Google
- 15 must know Chrome DevTools tips by Tutorialzine.com
Source Maps
Source Maps show you what ClojureScript code created the running JavaScript. This can be used for debugging, showing you the breakpoints set in your ClojureScript code
Chrome DevTools Extensions for ClojureScript developers
DevTool Extensions add more better presentation of ClojureScript values in Chrome DevTools using custom formatters, more informative exceptions with sanity hints) and support for Dirac DevTools - a fork of the Chrome DevTools.
Install DevTools Extensions
Add devtools dependency into your Leiningen's project.clj using the details on the Clojars.org website
Add the DevTools extensions to the startup part of your ClojureScript using the (:require [devtools.core :as devtools])
expression. Then call install!
function from devtools.core
namespace.
Here is an example of adding the DevTools extension library and calling it with several options
(ns your-project.core
(:require [devtools.core :as devtools]))
; this enables additional features, :custom-formatters is enabled by default
(devtools/enable-feature! :sanity-hints :dirac)
(devtools/install!)
(.log js/console (range 200))
For more details, visit the DevTools Extensions website and clone the sample project.
Dirac DevTools (a fork of Chrome DevTools)
Dirac DevTools is a fork of the Chrome DevTools.