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.
Written by Troy Shields
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Debug
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#