Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No any output while using debug #223

Closed
samundrak opened this issue Sep 13, 2015 · 6 comments
Closed

No any output while using debug #223

samundrak opened this issue Sep 13, 2015 · 6 comments

Comments

@samundrak
Copy link

I just installed and required debug in my project;
var debug = require('debug')('http');

and if i do debug('testing')
then no any output is done

but if i console.log(debug)
i see this message
{ [Function: disabled] enabled: false, namespace: 'http' }

where i am going wrong?

@dcsan
Copy link

dcsan commented Sep 14, 2015

you have to set an env var when you run your app

DEBUG="*" node app.js

read the docs for more info on namespacing.

@nikoskleidis
Copy link

This also occurred in my project too.
I am using this:
DEBUG=app:*
in my .env file and I am using it like this in my files
import _debug from 'debug';
const debug = _debug('app:ComponentName');
debug('start component');

But I cannot see any logging in my console

@dcsan
Copy link

dcsan commented Mar 4, 2016

maybe the colon throws off the regex? have you tried other ways?

@nikoskleidis
Copy link

Thank you for your quick reply.
I am using this kit in my project: https://github.com/davezuko/react-redux-starter-kit#usage
I have narrowed down the problem and I realized that on the node console I see the debug as expected. The problem is on the browser's console in which I see no logging. I use google chrome.

@nikoskleidis
Copy link

Figured it out! I needed to run this : localStorage.debug="app:*" on the browser in order to work properly. Thanks again for your interest!

@mooyoul
Copy link
Contributor

mooyoul commented Apr 8, 2016

/ping @TooTallNate This is another closable issue ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants