Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clojurescript breakpoints

Is there any way to create breakpoints in clojurescript? Either in the repl or in chromes native debugger.

I've tried (js* "debugger") and this returns

SyntaxError: Unexpected token debugger

Thanks!

like image 788
hcliff Avatar asked Jun 24 '12 22:06

hcliff


2 Answers

(js* "debugger;") should work. You're just missing the semicolon.

like image 182
Kevin L. Avatar answered Nov 08 '22 22:11

Kevin L.


In case someone see this later,

If you are inside a go block you might need to use this: (js* "0; debugger") because go macros creates variables definitions everywhere, so that fix on that scenario.

If for some other reason it doesn't, check the error log, you must like can find a way to "hack" the invalid compilation by adding something.

like image 45
Wilker Lucio Avatar answered Nov 08 '22 22:11

Wilker Lucio