mtqzuq
Last Updated: February 25, 2016
·
1.98K
· troylelandshields

Debug JavaScript in JSFiddle, Codepen, etc

Tools like JSFiddle and Codepen are awesome for writing some quick JavaScript/HTML/CSS and seeing it run quickly and easily in the browser. It's especially helpful for sharing solutions to common problems.

It's always bugged me, however, that there was no debugger on these tools where I could install break points to step through code or look at the state of things.

Or so I thought.

You can use the JavaScript command debugger; to hit a break point as long as you have the Developer Tools open. (I've only done this with Chrome, because why would you use anything else?)

Here is a JS Fiddle to prove it.

http://jsfiddle.net/w040w2eb/