macro | since v0.0-2496 | Edit |
(js-debugger)
Creates breakpoint that will stop the debugger if the browser's devtools are
open. Equivalent to debugger;
in JavaScript.
(defn foo []
(println "HI")
(js-debugger)
(println "WORLD"))
(foo)
;; will print "HI" then pause JS inside this function
;; if browser devtools are open.
Emit JavaScript "debugger;" statement
(core/defmacro js-debugger
[]
(core/list 'do
(core/list 'js* "debugger")
nil))