vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Allow disabling the "The PowerShell Extension terminal has stopped" notifications

Open CanePlayz opened this issue 2 months ago • 2 comments

Prerequisites

  • [x] I have written a descriptive issue title.
  • [x] I have searched all issues to ensure it has not already been reported.

Summary

While the "The PowerShell Extension terminal has stopped" notifications make sense to inform users about IntelliSense not working, they clutter up my notifications all the time. Especially since the PowerShell Extension terminal pops up way more often by now because it spawns when Copilot mentions some PowerShell code.

Image

I'd really like to be able to turn this off so my notifications can stay clean as I know what I'm doing by closing it.

Proposed Design

There should be a setting to turn off these notifications

CanePlayz avatar Nov 26 '25 05:11 CanePlayz

This also feels like a regression that started appearing a few months ago: I have the same setup for 3+ years, I aggressively restart all terminals, and I relaunch PowerShell. I use the PowerShell session solely for IDE support, while doing main dev in the Windows Terminal pwsh integrated console. This worked fine for years, but a few months ago, I started getting that error flyout whenever I restarted my terminals. From the log, it makes perfect sense: the flyout triggers upon process termination and should not care that a new session launched right after. So, in that sense, it's a helpful new feature, not a regression, but it's also quite annoying:

2025-11-25 23:44:37.773 [warning] PowerShell process terminated or Extension Terminal was closed, PID: 29744
2025-11-25 23:44:37.773 [error] The PowerShell Extension Terminal has stopped, would you like to restart it? IntelliSense and other features will not work without it!
2025-11-25 23:44:37.821 [info] Restarting session...
2025-11-25 23:44:37.839 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2025-11-25 23:44:38.833 [info] PowerShell process started with PID: 13172
2025-11-25 23:44:39.988 [info] Started PowerShell v7.5.4.

My console relaunching command (which I need because reasons):

  {
    "key": "alt+[Backquote]",
    "command": "runCommands",
    "args": {
      "commands": [
        "workbench.action.terminal.killAll",
        "workbench.action.terminal.new",
        "PowerShell.RestartSession",
      ],
    },
    "when": "!terminalEditorFocus && activeEditor != terminalEditor && viewContainer.workbench.view.extension.PowerShell.enabled",
  },

That said, I think my usecase is quite in the weeds and as I bothered to write a keyboard shortcut for it, I was able to remedy simply by adding notifications.clearAll:

  {
    "key": "alt+[Backquote]",
    "command": "runCommands",
    "args": {
      "commands": [
        "workbench.action.terminal.killAll",
        "workbench.action.terminal.new",
        "PowerShell.RestartSession",
        "notifications.clearAll",
      ],
    },
    "when": "!terminalEditorFocus && activeEditor != terminalEditor && viewContainer.workbench.view.extension.PowerShell.enabled",
  },

@CanePlayz I was going to suggest you do the same but then I saw that you actually don't want a PowerShell editor services session at all? If that's the case why don't you just disable the extension? I might be wrong but I am not sure the extension is actually doing anything for you if you purposely keep it off, and it will certainly resolve this issue for you.

jimmy-zhening-luo avatar Nov 26 '25 08:11 jimmy-zhening-luo

Well I do want the syntax highlighting and such in the editor

CanePlayz avatar Nov 26 '25 08:11 CanePlayz