skip to Main Content

VS Code terminal

I’m talking about these characters: x1b[0m x1b7x1b[1000Cx1b[32Dx1b[38x3b2x3b0x3b119x3b194mx1b[0mx1b[48x3b2x3b0x3b119x3b194mx1b[38x3b2x3b255x3b255x3b255m  pwsh x1b[0mx1b[38x3b2x3b0x3b119x3b194x3b49mx1b[7mx1b[0mx1b[38x3b2x3b76x3b175x3b80mx1b[0mx1b[48x3b2x3b76x3b175x3b80mx1b[38x3b2x3b255x3b255x3b255m  100 x1b[0mx1b[38x3b2x3b76x3b175x3b80x3b49mx1b[7mx1b[0mx1b[38x3b2x3b46x3b149x3b153mx1b[0mx1b[48x3b2x3b46x3b149x3b153mx1b[38x3b2x3b17x3b17x3b17m 08:55:45 x1b[0mx1b[38x3b2x3b46x3b149x3b153mx1b[0mx1b8

I’ve tried this accepted solution.
Set VS Code "terminal.integrated.shellIntegration.enabled": false and enabled "shell_integration": true in oh-my-posh configuration file. That didn’t work for me.

2

Answers


  1. This is probably a case of the bug described in issue ticket Terminal in VSCode Insiders not able to display special characters #211922.

    The fix has been made in Encode all chars 0x00-0x1f #215452 and is scheduled to be in the June 2024 release of VS Code.

    Some people say they were able to work around the issue by replacing the PowerShell shell integration script for 1.90 with an older version like this one. The path to the file to replace is in ~AppDataLocalProgramsMicrosoft VS CoderesourcesappoutvsworkbenchcontribterminalbrowsermediashellIntegration.ps1.

    Another user said that as a workaround, they could start a subshell (run pwsh.exe / powershell.exe) and the subshell wouldn’t have this issue.

    Login or Signup to reply.
  2. Like mentioned in the answer, a fix of this is scheduled for next month of VsCode. A way to get this fix sooner is to try in out VsCode Insiders , which offers nightly builds from here :

    https://code.visualstudio.com/insiders/

    It is not perfect, since this edition of VsCode has not added the same extensions as you have in VsCode, but using Vs Code – Insiders is a workaround for this annoying bug of Powershell terminal window.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search