Last Updated: February 25, 2016
·
1.483K
· jcreamer898

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?

2 Responses
Add your response

Just don't forget to remove it before committing :)

over 1 year ago ·

haha, good point!

over 1 year ago ·