debug statement

34 views
Skip to first unread message

Angelo Chen

unread,
Nov 15, 2012, 9:25:05 AM11/15/12
to nod...@googlegroups.com
Hi,

looking at nodejs source code, notice this:

    debug('Module._load REQUEST  ' + (request) + ' parent: ' + parent.id);

where can i find the doc for debug? thanks,

Angelo

Ben Noordhuis

unread,
Nov 15, 2012, 9:46:36 AM11/15/12
to nod...@googlegroups.com
There are no docs. You enable debug tracing with `NODE_DEBUG="net
http" node script.js`.

Note that there are only a couple of modules that actually print trace
info, `git grep NODE_DEBUG` will tell you which ones.

Вадим Барышев

unread,
Nov 15, 2012, 9:48:55 AM11/15/12
to nod...@googlegroups.com
debug is alias for console.error but only if process.evn.NODE_DEBUG contains 'module' string, otherwise it just do nothing.


Lines 65-74 is definition of debug

четверг, 15 ноября 2012 г., 18:25:05 UTC+4 пользователь Angelo Chen написал:
Reply all
Reply to author
Forward
0 new messages