Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrijac/break-js
Set breakpoint before function call from console - console.break()
https://github.com/andrijac/break-js
Last synced: about 1 month ago
JSON representation
Set breakpoint before function call from console - console.break()
- Host: GitHub
- URL: https://github.com/andrijac/break-js
- Owner: andrijac
- License: mit
- Created: 2014-02-01T09:11:48.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-02T04:47:06.000Z (almost 11 years ago)
- Last Synced: 2023-03-12T21:40:37.452Z (over 1 year ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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: booleanDetails on implementation:
http://andrijac.github.io/blog/2014/01/31/javascript-breakpoint/Usage
-To set the breakpoint:
```javascript
__break('foo.bar.func');
```
To remove the breakpoint:
```javascript
__break('foo.bar.func', true);
```Potentially, we could assign `__break` function to `console` object:
*Note: this is now added to script*
```javascript
if(!console.break) {
console.break = __break;
}
```