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

Errors in Powershell integrated console displayed "raw", not readable #2640

Closed
AFontenoy opened this issue Apr 17, 2020 · 9 comments · Fixed by PowerShell/PowerShellEditorServices#1264
Labels

Comments

@AFontenoy
Copy link

On one of my computers, when I run powershell code using VS Code, errors in integrated console are hardly readable.
It doesn't seem parsed at all.
It look like this :
PS D:\SharePoint\_Git_Repos> d:\SharePoint\_Git_Repos\Sharepoint\Scripts\test.ps1 [91mfoo: [0mD:\SharePoint\_Git_Repos\Sharepoint\Scripts\test.ps1:1:1 [96mLine | [96m 1 | [0m [96mfoo[0m [96m | [91m ~~~ [91m[96m | [91mThe term 'foo' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was [96m | [91mincluded, verify that the path is correct and try again.

I think that happend after installing Powershell 7, but I'm not shure.
I tryed to uninstall everything but Powershell with no luck.

Any ideas ?

@ghost ghost added the Needs: Triage Maintainer attention needed! label Apr 17, 2020
@TylerLeonhardt
Copy link
Member

@AFontenoy what OS and version are you on?

@TylerLeonhardt
Copy link
Member

This is a duplicate of #2637 (comment)

@TylerLeonhardt TylerLeonhardt added Resolution-Duplicate Will close automatically. and removed Needs: Triage Maintainer attention needed! labels Apr 17, 2020
@daxian-dbw
Copy link
Member

For some reason, the VSCode terminal doesn't handle the VT100 escape sequences on the version of OS you are using ...
To work around the issue, set $ErrorView = "NormalView" to get back the old error reporting behavior without using VT100.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Apr 17, 2020
@daxian-dbw
Copy link
Member

@TylerLeonhardt Just to clarify that this is not an exact duplicate. The missing of VT100 support affect the default error view in PS7. Updating on PSReadLine doesn't help with it.

@TylerLeonhardt TylerLeonhardt removed the Resolution-Duplicate Will close automatically. label Apr 17, 2020
@TylerLeonhardt
Copy link
Member

Good point @daxian-dbw .

@AFontenoy can you open a normal PowerShell 7 console (outside of VS Code) and see if this repros?

@AFontenoy
Copy link
Author

@AFontenoy what OS and version are you on?

@TylerLeonhardt It's on Windows Server 2008 R2 Std.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Apr 20, 2020
@AFontenoy
Copy link
Author

@daxian-dbw I set $ErrorView = "NormalView" and voila ! It looks as before.
Thanks !

@AFontenoy
Copy link
Author

@TylerLeonhardt In normal Powershell 7 console the problem is not showing.

@TylerLeonhardt
Copy link
Member

Still should leave this open because we should fix the issue where ErrorView is concise.

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

Successfully merging a pull request may close this issue.

4 participants