Add Debug breakpoints support (#17295)

* Add Debug breakpoints support

* Add Debug breakpoints support
This commit is contained in:
Juan Carlos 2021-03-08 05:32:49 -03:00 • committed by GitHub
commit 0234b479ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -205,6 +205,8 @@ provided by the operating system.
- Removed support for named procs in `sugar.=>`
- Added `jscore.debugger` to [call any available debugging functionality, such as breakpoints.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger)
## Language changes

View file

@ -13,6 +13,7 @@
## specific requirements and solely targets JavaScript, you should be using
## the relevant functions in the `math`, `json`, and `times` stdlib
## modules instead.
import std/private/since
when not defined(js):
{.error: "This module only works on the JavaScript platform".}
@ -104,3 +105,8 @@ proc setFullYear*(d: DateTime, year: int) {.importcpp.}
#JSON library
proc stringify*(l: JsonLib, s: JsRoot): cstring {.importcpp.}
proc parse*(l: JsonLib, s: cstring): JsRoot {.importcpp.}
since (1, 5):
func debugger*() {.importjs: "debugger@".}
## https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger