Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tc39/proposal-standardized-debug
Standardized debug
https://github.com/tc39/proposal-standardized-debug
debugging ecmascript javascript
Last synced: 3 months ago
JSON representation
Standardized debug
- Host: GitHub
- URL: https://github.com/tc39/proposal-standardized-debug
- Owner: tc39
- License: mit
- Created: 2020-08-12T03:12:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-25T19:47:02.000Z (over 3 years ago)
- Last Synced: 2024-08-02T06:23:43.564Z (6 months ago)
- Topics: debugging, ecmascript, javascript
- Language: HTML
- Homepage: https://tc39.es/proposal-standardized-debug
- Size: 41 KB
- Stars: 34
- Watchers: 14
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Standardized Debug
This proposal is at Stage 1 of the [TC39 Process](https://tc39.es/process-document/).
## Motivation
Different environments expose different APIs for interacting with debugger
facilities. Some of them do not expose any APIs for this at all. This proposal
aims to provide standardized debugging facilities across all ECMAScript
implementations. Additionally, the APIs are constrained to be identity
functions - that is, they return the value which is passed to them.This proposal suggests adding the following meta-property-functions to ES:
- `debugger.log ( v )`
- `debugger.break ( [ v ] )`Note that, like `import()`, they are only valid in call expression form. For
example, `x().then(debugger.break)` would be invalid. You would have to do
`x().then((v) => debugger.break(v))`. This limitation is in place to ensure
these methods (particularly `break`) are only ever invoked from ECMAScript code.