Skip to content

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

License

Notifications You must be signed in to change notification settings

andrijac/break-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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;
}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published