Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 614
mocrsteel Avatar asked Aug 28 '26 20:08

mocrsteel


1 Answers

Yes, it is related to a broken $PATH.

You need to remove the path that points to code.exe and add the path that points to the bin folder in the same directory where code.exe is located.

The bin folder contains scripts that run code.exe without logs.

source of info

like image 96
PFA hard Avatar answered Aug 30 '26 17:08

PFA hard