/break-js

Set breakpoint before function call from console - console.break()

Primary LanguageJavaScriptMIT LicenseMIT

break-js

Set breakpoint before function call from console, this could potentially be implementation of console.break().

Script makes global function __break.

Parameters:

  1. Function name
    • Mandatory
    • Type: string
  2. Remove breakpoint
    • [Optional]
    • Type: boolean

Details on implementation: http://andrijac.github.io/blog/2014/01/31/javascript-breakpoint/

Usage

To set the breakpoint:

__break('foo.bar.func');

To remove the breakpoint:

__break('foo.bar.func', true);

Potentially, we could assign __break function to console object:
Note: this is now added to script

if(!console.break) {
  console.break = __break;
}