How to set a JavaScript breakpoint from code in Chrome? How to set a JavaScript breakpoint from code in Chrome? javascript javascript

How to set a JavaScript breakpoint from code in Chrome?


You can use debugger; within your code. If the developer console is open, execution will break. It works in firebug as well.


You can also use debug(function), to break when function is called.

Command Line API Reference: debug