Skip to content
Debugging utility for deno. Ported from https://npmjs.com/debug
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis.yml
LICENSE
Makefile
README.md
debug.ts
debug_test.ts
demo.png
demo.ts
format.ts
format_test.ts
test.ts
utils.ts

README.md

Deno Debug Build Status

Debug utility for deno. Under development.

Usage

import debug from "https://raw.githubusercontent.com/rista404/deno-debug/master/debug.ts";

// create debugger
const service = debug("service");

const serviceName = "app";

// log
service("booting %s", serviceName);

Then run your app.

> DEBUG=* deno --allow-env app.ts

Todo

  • extending debuggers
  • custom log functions
  • custom formatters
  • log override in all namespaces
  • inspect opts
  • detecting color support
  • non-tty env
  • add debug to registry

Notes

  • Currently debug assumes it is TTY and shows colors by default.
  • Deno's inspect differs from node's util.inspect so the output may not be the same.
  • We're using a custom format function ported from util. Might be cool to extract it when util is ported entirely.
  • We should cover more functionality with tests.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.