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

outputting to the browser console #170

Closed
gnaryak opened this issue Jan 15, 2015 · 4 comments
Closed

outputting to the browser console #170

gnaryak opened this issue Jan 15, 2015 · 4 comments

Comments

@gnaryak
Copy link
Contributor

gnaryak commented Jan 15, 2015

Hi - The documentation in Readme.md about how to output debug statements to the browser console appears to be incomplete. It would be great if you could update Readme.md to change from:

Debug works in the browser as well, currently persisted by localStorage. For example if you have worker:a and worker:b as shown below, and wish to debug both type debug.enable('worker:*') in the console and refresh the page, this will remain until you disable with debug.disable().

to

Debug works in the browser as well, currently persisted by localStorage. Consider the situation shown below where you have worker:a and worker:b, and wish to debug both. Somewhere in the code on your page, include:
window.myDebug = require("debug");
("debug" is a global object in the browser so we give this object a different name.) When your page is open in the browser, type the following in the console:
myDebug.enable("worker:*")
Refresh the page. Debug output will continue to be sent to the console until it is disabled by typing myDebug.disable() in the console.

@gnaryak
Copy link
Contributor Author

gnaryak commented Jan 20, 2015

I created a pull request for this change.

Thanks.

@r4j4h
Copy link

r4j4h commented Aug 9, 2015

+1

@pjuke
Copy link

pjuke commented Apr 20, 2016

YES YES YES +1

@thebigredgeek
Copy link
Contributor

Already fixed and merged via PR above

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