Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kldzj/debug
A simple JavaScript debugger.
https://github.com/kldzj/debug
debug env log nodejs
Last synced: 1 day ago
JSON representation
A simple JavaScript debugger.
- Host: GitHub
- URL: https://github.com/kldzj/debug
- Owner: kldzj
- Created: 2022-07-18T15:22:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-18T06:06:36.000Z (about 1 year ago)
- Last Synced: 2024-09-19T23:37:39.587Z (about 2 months ago)
- Topics: debug, env, log, nodejs
- Language: TypeScript
- Homepage: https://npmjs.com/@kldzj/debug
- Size: 170 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Just another simple JavaScript debugger.
## Installation
Using yarn:
```sh-session
$ yarn add @kldzj/debug
```Using npm:
```sh-session
$ npm i -S @kldzj/debug
```## Example usage
```typescript
// demo.js
import { createDebugger } from "@kldzj/debug";const debug = createDebugger("test");
debug.debug("Hello World");// you can enable/disable the debugger during runtime:
debug.disable();
debug.enable();// you can also create child debuggers:
const child = debug.createChild("comp");child.debug("Hello World");
// would log: [test:comp] Hello World// ...
// if you don't want to handle the `Debugger` class instance
// you can create a simple function interface right away:
const debug = createDebugger("test").createFunction();
debug("Hello World");
``````shell
# In your terminal:
$ DEBUG=test:* node demo.js
```