Breakpoint in JS Code
A quick way to force a browser to hit a breakpoint in a block of JS code is with the debugger
keyword.
//codecodecode
debugger;
someMethodToDebug();
//morecodecodecode
When the browser is running the JS code it will automatically cause a breakpoint to occur in the code. Neat eh?
Written by Jonathan Creamer
Related protips
2 Responses
Just don't forget to remove it before committing :)
over 1 year ago
·
haha, good point!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Debugging
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#