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 +0ms..ox/folder/file2.js sum_inner +3ms../_sandbox/file1.js times +202ms..ox/folder/file2.js sum_inner +0mstotal: 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 | returned: 2 | time elapsed: +0ms..io/_git/ast/debug-print/_sandbox/folder/file2.js 2 | sum_inner | returned: 2 | time elapsed: +3ms..ome/julio/_git/ast/debug-print/_sandbox/file1.js 11 | times | returned:
test
# install nodemon npm i nodemon -g # see result DEBUG=* nodemon _sandbox/file1.js