-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Add ability to display high intensity ANSI colors in debug console #21423
Comments
Looks like the problem is not a missing high-intensity-color support. I think the problem is that each ANSI escape sequence fully overwrites the previous state. Another problem is that it is not possible to set the color and the intensity with a single sequence. Here is a small sample program to reproduce the problem:
The output must look like this: But unfortunately it looks like this: EDIT: Using the Inspector shows the actual problem. The escape-sequences must generate nested span tags to achieve a bold red color but vscode doesn't do that: |
Thanks for the great analysis. PRs welcome on fixing this |
@roblourens , isidorn is there any update ? |
@saeedtabrizi no, but we accept PRs to fix this |
If I'm a newbie, how hard would it be for me to dive in and fix this? |
@jpike88 Should not be easy, but also not super hard. The code pointer is still valid, so you can try making changes to ReplViewer and try to start supporting all the ansi colors. You can deffinetely try and see how it goes. |
@jpike88 Are you going to work on this issue? If not I'd like to take it up, but you have priority if you want it. |
@danielfrankcom All yours man, if you have trouble I’ll dive in. |
@danielfrankcom fyi I prefer smaller seperate PRs. So fixing the bold can be part of another PR in case we decide to do it |
@danielfrankcom could you confirm whether this will work with https://github.com/Marak/colors.js? |
Here is a screenshot of the current master: And here is a screenshot of the feature branch: So in short, no it will not. The only difference I see between these 2 screenshots is the "Chains are also cool." line which is now bold, however many of these things are currently not supported, such as underlining, custom background colors, the zebra thing, and the inverse background/foreground thing. For reference: |
If there is some interest, I may look at including some of these things as features, and possibly adding a pull request to make the bold ... more bold? |
Damn, weird. I wish this wasn’t so complicated. I’ll flag this to the colour.js maintainer as an FYI |
Fixes #21423 | Add ANSI colour tokens as children of existing tokens
#21423 | Add underline styling to debug console
Thanks to @danielfrankcom this issue should now be fixed. I only tried with simple examples on my machine and it works nicely. |
@danielfrankcom could you do me a favour and throw your five cents in here? I'm about to start looking at tweaking colors.js but the repo owner is present there, would be great to see an exchange between you two as I look into it. |
The debug console honors ANSI color codes embedded in strings, but it treats high intensity color codes the same as low intensity, i.e., dark colors. It would be useful if the high intensity color codes generated the high intensity colors. I realize that using ANSI color codes in the debug console is an undocumented feature, but it is a very useful one. See the screenshot below for an example of how my debugger/extension uses them to do syntax highlighting of code evaluated in a REPL.
Although the syntax highlighting is better than no highlighting, it would be even better if the colors were brighter and a better match for the syntax highlighting in the editor. Please allow high intensity color codes to display as such in the debug console.
The text was updated successfully, but these errors were encountered: