question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use console.debug() instead of console.log() where available (e.g. browsers)

See original GitHub issue

Currently debug output in the browser gets console.log()'d.

However, browsers have a console.debug() call (nonexistent in Node.js, of course) that would group all debug output into its own category, perhaps making it easier for debugging in the browser when trying to look at regular application output.

Relevant lines:

https://github.com/visionmedia/debug/blob/master/src/browser.js#L112-L114

Thoughts?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
targoscommented, Nov 24, 2018

console.debug() is available in Node from version 8, and would also be filterable with inspector tools if node is run with --inspect.

0reactions
Qix-commented, Nov 19, 2020

@PieerePi That is definitely chrome’s problem, not ours. This library isn’t built for only chrome.


Locking this as I don’t think there’s much more discussion to be had here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use console.debug() instead of console.log() where available ...
Currently debug output in the browser gets console.log() 'd. However, browsers have a console.debug() call (nonexistent in Node.js, ...
Read more >
console.debug() - Web APIs - MDN Web Docs
The console.debug() method outputs a message to the web console at the "debug" log level. The message is only displayed to the user...
Read more >
How to stop using console.log() and start using your browser's ...
In order to debug this in Chrome, you need to get used to using DevTools. To open Chrome Developer Tools, press Command+Option+I (Mac)...
Read more >
Using console.log() debugging in Visual Studio Code
Using the new in-built JavaScript debugger in Visual Studio code you can use the browser developer tools Console right inside the editor.
Read more >
Chrome: console.log, console.debug are not working
log statements to my Javascript, and nothing was displaying in the console. Problem turned out to be due to browser caching... it wasn't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found