We need a way to customize output color for error/warning, etc
See original GitHub issueSpecifically, in PowerShell.exe we have the ability to change the color used for errors, warnings, etc.:
C:\PS> $Host.PrivateData
ErrorForegroundColor : DarkRed
ErrorBackgroundColor : Black
WarningForegroundColor : Yellow
WarningBackgroundColor : Black
DebugForegroundColor : Green
DebugBackgroundColor : Black
VerboseForegroundColor : Cyan
VerboseBackgroundColor : Black
ProgressForegroundColor : DarkMagenta
ProgressBackgroundColor : Gray
In VSCode I can change the colors of the 16 ANSI colors, but I can’t find a way to change which of them you are using to write errors out.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:23 (22 by maintainers)
Top Results From Across the Web
Please change the color of error output · Issue #7451
I have attached a picture with the change in error color from ... it is hard to reliably decide whether something is an...
Read more >Can I change the color of text from PUT statement without ...
But I was wondering if there's a way I can control the color of the resulting text in the log to be something...
Read more >How to configure console log to recognize error/warn/info ...
I see in IntelliJ's preferences, under Editor > Color Scheme > Console Colors, that you can configure colors for Error, Warning, Info, etc....
Read more >How to change the color of the PowerShell ISE editor using ...
To change the color of the ISE Editor, we need to use $psISE cmdlet which is only available for the ISE editor. Now...
Read more >Make Your PowerShell Errors Less Harsh By Changing Their ...
The answer to how to change the color of the error message lies in PrivateData property of $host (which is an automatic variable...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If anyone is interested in picking this up the general idea is to
Port ConsoleColorProxy and the PrivateData member from
ConsoleHost
in pwsh to EditorServicesPSHost.PrivateDataChange the Write* methods in EditorServicesPSHostUserInterface to use the new colors
@tylerl0706 Well I changed it in
EditorServicesPSHostInterface
But it doesn’t change in my pwsh
Here’s my
WriteOutput
I did my
Invoke-Build Build
and there’s no errorEdit
It’s really strange, I change my
WriteOutput
But my error foreground color is still red !
Edit 2
Nevermind !! It works that was just a little problem from my installation 😃
I will do the Pull Request !