Hi everyone,
I'm working in WebStorm and have been enjoying debug colors for a good while. However, after an update from [email protected] to [email protected] all of the colors are gone being replaced by a straight red.
Downgrading back to [email protected] - colors are back.
Please refer to attached image. Sequelize uses debug@latest and entries are shown in red, perhaps they used to be colored before update.
app-user:scripts: are my entries written with [email protected]. Change I debug to v3.0.x, they are turned red.
Any thoughts?

@TooTallNate did debug v3 change to outputting to stderr? That's my first guess.
https://github.com/visionmedia/debug/blob/master/src/node.js#L126 < yup. You can override:
const debug = require('debug');
debug.log = console.log.bind(console);
Yeah :/ IMO Webstorm should just be issuing \x1b[31m at the beginning of lines and allowing the program to output its own colors (i.e. by allowing the program to issue \x1b[0m directly before it if it doesn't want the red coloring).
Common case of IDE's trying to be smarter than the applications (note to IDE developers: don't do this - it never works well).
You're welcome to open a ticket with WebStorm or override the output like @thebigredgeek suggests (though I don't recommend doing this at all) - however there's nothing we can really do on our end.
Sorry about this :/
To be clear, you can parse the output text before passing to console.log if you override debug.log, so really you can fix this however you'd like in application code
Closing since there's nothing actionable on our end for this one.
Hi,
Indeed, WebStorm doesn't support stderr coloring at the moment (https://youtrack.jetbrains.com/issue/IDEA-137769). It's not an easy fix, because it will lead to API breakage. But it is on my list. Meanwhile, why is it impossible to configure output stream for debug package, like before: DEBUG_FD=1?
@segrey Thanks for handling it!
Configuring output streams isn't common in unix environments. debug would be the first package I've ever seen that allows you to select which file descriptor you want to output on. Usually you let the shell redirect descriptors.
Agree, configuring output stream isn't common, but it was working like this before :). Alright, will try to fix it on WebStorm's side.
for anyone looking for a quick fix, as mentioned above you can bind to the console. Remember to do it like so:
require('debug').log = console.log.bind(console);
and not:
require('debug')('namespace').log = console.log.bind(console);
the latter will only bind log for the particular namespace!
Most helpful comment
To be clear, you can parse the output text before passing to
console.logif you overridedebug.log, so really you can fix this however you'd like in application code