Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Added support for basic color escape sequencies on Debug Console #367

Merged
merged 3 commits into from
Oct 17, 2018
Merged

Added support for basic color escape sequencies on Debug Console #367

merged 3 commits into from
Oct 17, 2018

Conversation

rdegelo
Copy link
Contributor

@rdegelo rdegelo commented Oct 12, 2018

Added support for bold font style on Debug Console.

Background color can be easily implemented using the same approach.
If this PR gets accepted, I can add background colors support.

Added support for bold font style on Debug Console
@msftclas
Copy link

msftclas commented Oct 12, 2018

CLA assistant check
All CLA requirements met.

@rdegelo
Copy link
Contributor Author

rdegelo commented Oct 12, 2018

Related to issue: Microsoft/vscode-chrome-debug#282

@roblourens
Copy link
Member

This looks great, but the font-weight doesn't appear to have any affect in the Debug Console. Is it working for you? I don't know whether vscode supports it.

@rdegelo
Copy link
Contributor Author

rdegelo commented Oct 17, 2018

It works for me:

console.log('%c Normal font weight ', 'color: blue');
console.log('%c Normal font weight ', 'color: blue; font-weight: bold');

Result:
image

To check what is supported, you can see this file:
https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/browser/debugANSIHandling.ts#L70

@roblourens
Copy link
Member

roblourens commented Oct 17, 2018

I see it, the problem is that the debug console uses the Monaco font on macos, which doesn't support a bold font weight. Will take that upstream...

@rdegelo
Copy link
Contributor Author

rdegelo commented Oct 17, 2018

Cool,
When I have time I'll add background/underline support and post a new PR.

@roblourens roblourens merged commit c1d4532 into microsoft:master Oct 17, 2018
@roblourens roblourens added this to the October 2018 milestone Nov 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants