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

Chalk doesn't detect color support for VSCode Debug Console #254

Closed
arabold opened this issue Feb 9, 2018 · 4 comments
Closed

Chalk doesn't detect color support for VSCode Debug Console #254

arabold opened this issue Feb 9, 2018 · 4 comments

Comments

@arabold
Copy link

arabold commented Feb 9, 2018

Chalk works perfect for nearly all use cases we have and we make heavy use of testing for chalk.enabled to decide how we format our log output. This works in the local command line as expected and logs are printed colorfully.

Since we're switching from Atom to VSCode I've noticed that the color mode detection doesn't seem to work for the VSCode console. chalk reports supportsColor and enabled both being false. The VSCode Debug Console clearly supports colors and if I manually enforce chalk to use colors it works fine and as expected. But I wonder if this automatic detection is something that can be fixed?

@sindresorhus
Copy link
Member

This is what we use for detecting color support: https://github.com/chalk/supports-color I don't use VSCode, but you could look in supports-color where it's returning false for color support.

@wuweiweiwu
Copy link

@sindresorhus can I pick this up? :)

@sindresorhus
Copy link
Member

Sure, go ahead :)

@wuweiweiwu
Copy link

@sindresorhus @arabold fixed! albeit a little hacky

chalk/supports-color#77

It is because vscode debugger is not a full terminal emulator

microsoft/vscode#3006 (comment)

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

No branches or pull requests

3 participants