How colors the debug console vscode - visual-studio-code

It possible to have color in console debug.
at left it what i have on nwjs, and at right it what i have in vscode.
which plugin or parameter to add in vscode to get a result similar result to the one on the left.
thanks
Edit: see texts and objs log colors. Firefox,chrome have color syntax, but am not understand why vscode doesn't have it ? It essential for dev productivity.

Related

Problem with ZSH arrows' colors in Visual Studio Code

I've tried installing oh-my-zsh on my Windows 10 machine recently and everything is looking alright inside Windows Terminal,
ut when I try using it inside VSCode's integrated terminal, the colors are way off and the arrows' colors are different from the rest.
Imgur link to what my terminal looks like since Stack Overflow won't let me post any photo: https://imgur.com/a/3myV6wf
I've tried multiple Powerline fonts, modifying VSCode color theme and changing the terminal foreground color, but the result is always the same.
Thanks in advance for your help
I was perplexed by this as well, turns out it's something that recently broke in VS Code as a result of a new accessibility feature introduced in version 1.66. The solution is to add the following to your VS Code settings.json file:
"terminal.integrated.minimumContrastRatio": 1,
Enforcing a minimum contrast ratio for terminal colors is a great idea that will help users with impaired vision, but an unintended consequence was that it would interfere with the way powerline-style tools render separator characters. Thankfully Microsoft offered us a way to disable it.

vscode jest runner, illegible output colours in terminal

as you can see in the image below, showing yellow text on a white background, in an otherwise dark themed terminal. the jest runner output is completely illegible, none of my setting as far as I have looked should affect this.
I have searched for solutions but not found anything.
any help greatly appreciated.
so i can use the terminal contrast ratio settings (as above) to get a more legible output.. not really the solution I'd like, but a workaround for now...

VS Code 1.15.1 The Run Code Toolbar Not Appear in Green Color as It Used to

I need a help. I read VSC Debugging doc and about launch.json. Nothing has helped me so far when searching for an answer on this specific issue in STO and VS Code documentation.
I've been annoyed, frustrated by this little bug in my Visual Studio Code 1.15.1. I worked on python project and things were good and with the run code triangle toolbar on the top right appeared in green color. Then I worked on C project. But when I wanted to go back working on a python project, the run code toolbar did not appear in green color like it used to. I've never changed anything in the setting.
the run code toolbar/button appeared in green color
the run code toolbar/button not appeared in green color
Do I need to install AutoLaunch 2.0.3 (Automatically run tasks in tasks.json or launch config in launch.json ) in order to get the green color back on the Run Code button/toolbar?
I just want simply the green color back. What should I do to get that green color back on the run code triangle toolbar? What setting I should change? I was thinking uninstalling my VS Code and reinstalling it should solve this issue.
Thanks in advance.

VS Code terminal colors are screwy

I'm using the default theme. The terminal's colors are impossible to read, make no sense, and are inconsistent. I've tried switching themes but they're terrible in all the themes.
Here's what it looks like in the default. Are you able to read my yellow input against the gray background? And why isn't there a black background everywhere?
I realize there are settings that can manually set the fore/background colors. But I'm thinking something is broken for me because of how screwy the terminal behaves.
For example, here's what I see when I first start the terminal, type a bunch of stuff, backspace to delete half of it, resize the terminal pane, then delete some more. Notice how some of the deleted spaces have yellow and some have gray. Also notice how the area where the CWD would be shown is all black.
Here are the contents of my settings.json file:
{
"window.zoomLevel": 0,
"git.enableSmartCommit": true,
"workbench.startupEditor": "newUntitledFile"
}
What needs fixing, and how?
Edit:
Just to satisfy your curiosity, I added this to my settings.json file:
"workbench.colorCustomizations": {
"terminal.foreground": "#ffffff",
"terminal.background": "#000000"
}
No joy:
There might be something wrong in your console settings, you might want to remove the content of HKCU\Console in your registry. Save it before, obviously, but there shouldn't be any side effect: it'll just be recreated with the default settings.
Okay, so here's a list of all possible settings that you could tweak in your terminal window colorscheme: (source)
"workbench.colorCustomizations": {
"terminal.background":"#1D2021",
"terminal.foreground":"#A89984",
"terminalCursor.background":"#A89984",
"terminalCursor.foreground":"#A89984",
"terminal.ansiBlack":"#1D2021",
"terminal.ansiBlue":"#0D6678",
"terminal.ansiBrightBlack":"#665C54",
"terminal.ansiBrightBlue":"#0D6678",
"terminal.ansiBrightCyan":"#8BA59B",
"terminal.ansiBrightGreen":"#95C085",
"terminal.ansiBrightMagenta":"#8F4673",
"terminal.ansiBrightRed":"#FB543F",
"terminal.ansiBrightWhite":"#FDF4C1",
"terminal.ansiBrightYellow":"#FAC03B",
"terminal.ansiCyan":"#8BA59B",
"terminal.ansiGreen":"#95C085",
"terminal.ansiMagenta":"#8F4673",
"terminal.ansiRed":"#FB543F",
"terminal.ansiWhite":"#A89984",
"terminal.ansiYellow":"#FAC03B"
}
Now for me, the colors of folder names was too bright over an even brighter background color that highlighted them and I couldn't read squat (that's because of my VSCode theme called NightOwl -- :P Sarah) so I thought (wrongly) to change terminal.background and terminal.foreground properties but that refer to the entire rendered window of the terminal.
Because these properties are actually named after Ansi Escape Codes, what I was actually looking for were these properties: terminal.ansiBlue for folder name text color and terminal.ansiGreen for folder name background highlight color.
As soon as I tweaked those, my terminal was good to go.
The way to do it is to just set all these settings and start removing or changing them to see which is which for your preference. K Thx Bye
Also beware that terminal.ansiGreen is used by git diff as a color to show additions.
On March 8th 2022 the default value for the integrated terminal "minimum contrast ratio" was updated from 1 (no effect) to 4.5 (minimal effect). Depending on your color settings and what is being displayed, this can cause your integrated terminal foreground colors to be wrong.
To disable this feature, override the default in your own settings.json file:
"terminal.integrated.minimumContrastRatio": 1
There are two solutions. Xavier's solution works, and mklement0's comment was also correct.
Solution #1
Do what Xavier said (and upvote his answer).
But, if you don't want to mess up registry settings (or if, like me, you have lots of registry settings nestled under the HKCU\Console root), then...
Solution #2
Get Windows 10 build number 18309 (or newer)
Join the Windows Insider Program
Make sure you're on a "ring" that includes a new-enough build. For me at this moment that meant joining the "fast" ring
Wait forever for updates to finish installing
Add "terminal.integrated.windowsEnableConpty": true to your settings.json
Restart terminals
Upvote mklement0's comment
...
Profit!
I am new to VS Code (and I'm trying to better my PowerShell skills) and have/had this same problem. Deleting all the Reg keys cited above related to colors seemed to fix it, but I believe the root problem is that VS Code seems to be trying to honor the color scheme set up outside the VS Code Terminal itself, from the shell. Really annoying and I'm not sure how to separate the two.
I had setup a blue background/yellow font scheme in PS prior to installing VS Code. That was the same color scheme the terminal in VS Code was displaying directly around the text.

is there some format plugins work with eslint?

With the help of eslint plugin,we can get a warn in vscode when there are some mistakes in the sourcecode.
But after that,how could I format the code to remove these mistakes?If I just achieve the build-in format command,It will get a result not suitable with eslint's configuration.
So,is there a plugin which can solve this problem?
When ESLint highlights code with an error, if you place cursor on the part of code that has red squiggly under it, you should see a light bulb icon show up in the gutter. Clicking that light bulb will give you a menu to autofix this instance of the error, all instances of the errors from this rule, or autofix all fixable rules. You can also assign shortcuts to those actions and call them from keyboard.