Giter VIP home page Giter VIP logo

debug-print's Introduction

debug-print

install

npm i debug-print

usage

TODO

ENVS

  • DEBUG

  • enable debug and debug-print. Se more details on debug README (https://github.com/visionmedia/debug#wildcards)

  • DEBUG_SUBJECT_RIGHT

  • size o "subject", default === 50, to show or cut

  • DEBUG_STYLE

  • 1 | small: one line only

  • 2 | detail: will show arguments and function return statement

  • DEPTH

examples

small, right = 20
$ DEBUG=* DEBUG_STYLE=1 DEBUG_SUBJECT_RIGHT=20 node _sandbox/file1.js

../_sandbox/file1.js     sum(7) +0ms
..ox/folder/file2.js     sum_inner(2) +3ms
../_sandbox/file1.js     times(11) +202ms
..ox/folder/file2.js     sum_inner(2) +0ms
total: 12
detail, right = 50
$ DEBUG=* DEBUG_STYLE=2 DEBUG_SUBJECT_RIGHT=50 node _sandbox/file1.js

..ome/julio/_git/ast/debug-print/_sandbox/file1.js
  7 | sum (1, 1)
    |   returned: 2
    |   time elapsed: +0ms
..io/_git/ast/debug-print/_sandbox/folder/file2.js
  2 | sum_inner (-4, 6)
    |   returned: 2
    |   time elapsed: +3ms
..ome/julio/_git/ast/debug-print/_sandbox/file1.js
  11 | times ({ a: 2, b: 3 })
    |   returned: { result: 6 }
    |   time elapsed: +204ms
..io/_git/ast/debug-print/_sandbox/folder/file2.js
  2 | sum_inner (0, 2)
    |   returned: 2
    |   time elapsed: +0ms

test

# install nodemon
npm i nodemon -g

# see result
DEBUG=* nodemon _sandbox/file1.js

links

debug-print's People

Contributors

julio-saito-linx avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.