#952·debug

Debug mixed with console.log

Author: mjgsCreated Nov 15, 2023Updated Jan 6, 2025

I use the debug module a lot. It’s great.

One thing I’m finding an issue though is with CLI apps, because these tend to use console.log with something like chalk for colors, and when you set your DEBUG string the output from console.log and debug get mixed together in a way that’s quite unreadable because all the outputs are out of sync.

Is there a way to ensure that output from debug and console .log stay in sync?