I don't think this env variable is "standard" but if you happen to have
other modules with that convention you can do NODE_DEBUG=request,http,x,y,z
 it match the word on any part of the string.

If you want to do this in code, you can do:

process.env.NODE_DEBUG = "request,http,foo";



2013/11/14 Reza Razavipour <[email protected]>

> thanks for the response.
>
> How do I do that in the code itself? and how do I do multiple ones? lets
> say debugging for http and request and xyz package.
>
>
>
> On Thursday, November 14, 2013 10:17:53 AM UTC-8, José F. Romaniello wrote:
>
>> it seems to be matching a regular expression, NODE_DEBUG should contain
>> the string "request".
>>
>> So, you can run your application as follows:
>>
>> NODE_DEBUG=request node your_app.js
>>
>>
>> 2013/11/14 Reza Razavipour <[email protected]>
>>
>>> Still fairly new to node.js !!!
>>>
>>> I am using node-soap and it uses the request package.
>>>
>>> In index.js which is part of the request package, I see this line
>>>
>>> request.debug = process.env.NODE_DEBUG && /request/.test(process.env.
>>> NODE_DEBUG)
>>>
>>> how do I make sure the second part is true,  
>>> /request/.test(process.env.NODE_DEBUG
>>> that is?
>>>
>>> This is how they are testing if something gets logged to the console or
>>> not.
>>>
>>> Any ideas?
>>>
>>> --
>>> --
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-
>>> Posting-Guidelines
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to [email protected]
>>>
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to