VS Code outputs logs to terminal when launched with 'code' command

99 Views Asked by At

Issue

VS Code outputs its logs to the PowerShell terminal from which it was launched using the code . command. Disabling these logs would be interesting as it populates a terminal instance for no good reason. I searched through Stackoverflow without success so far, so I hope there's not a duplicate out there.

Did anyone encounter this issue or have an idea in which direction I should be looking into? From what I've tried so far it seems that it's specific to PowerShell 7.

System: Windows 10, PowerShell 7 enter image description here

What I've tried

  • Uninstalling and reinstalling VS Code. Issue persists.
  • Install VS Code insiders in parallel: it doesn't show the same issue.
  • Try VS Code on a different machine: MacOS / Ubuntu: No issue, Windows 10 desktop (personal): No issue. My settings.json is synced between the different machines.
  • Try other terminals: it only occurs on the powershell 7 terminal. CMD or the default Windows PowerShell doesn't have the same issue.
  • Upgrade PowerShell 7 to latest. No solution.

What I would expect: No logs being outputted to the powershell terminal where code was launched.

1

There are 1 best solutions below

0
bubezi On

Just cancel the logging with CTRL z and press Enter. This worked for me.

The logs started showing after I reinstalled Python and changed the PATH in environment variables and added the location of VScode. Maybe knowing this can help find a long-term solution.

EDIT:

Just to add, this is temporary and when I close the terminal, the VScode instance closes too.