Change:
this.debugAdapter.onRequest(request => this.dispatchRequest(request)); } <ins> get isInShutdown() { return this.inShutdown; } </ins> get onDidExitAdapter(): Event<AdapterEndEvent> { return this._onDidExitAdapter.event; }

Discussion:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.75.1 OS Version: MacOS Ventura 13.2 (22D49) I'm using VS Code to debug an attached Node app. The problem is that each time that I restart the Node app, new pseudo targets are to the "Select Debug Console" dropdown of the debug console. Problem started in 1.75.0. In prior versions, only the "Server" target would appear after restarts (I'm debugging in multiple target environment, so the dropdown is always visible). Since 1.75.0 (and .1), two new targets are to this list (webpack + ) after each restart. Here's how this dropdown looks like after 3 restarts: <img width="431" alt="Screenshot 2023-02-09 at 12 39 52 PM" src="https://user-"A similar issue happens when attempting to debug a React app - each reattach adds a new pseudo target to the list. The targets that are to the debug dropdown are "stale" - switching to one of these pseudo items shows an empty debug console. Steps to Reproduce: debugging a JS app that is connected via the attach debug mode the debug console the app using the "restart" icon on the debug panel on the Select Debug Console dropdown, and observe new pseudo targets have been to the list (and on each subsequent restart) I tested the same configuration with VSCode 1.74.3, and the problem does not appear.

I noticed this, I haven't looked into it at all but wondering whether it's related somehow to
This is a pain, I often restart my server process and I just see this slowly building list of old server processes. I don't need to keep their logs behind, it just clogs the doprdown. <img width="309" alt="Screenshot 2023-02-22 at 8 48 24 pm" src="https://user-"
ignore my last comment... I found the setting Debug › Console: Close On End was 'off' by default. Turning it on resolved the problem
Yea this looks expected since we have a process ID as part of the session name, so they get unique terminals. Could argue we shouldn't... but we do, and I've found it handy on more than one occasion
The problem persists after turning on Debug › Console: Close On End (on version 1.75.1). When the said option is on, the terminal/console pane indeed closes when debug stops, but when I restart the process, the pane re-shows with the "select debug console" dropdown populated with the terminated processes. In any case, the problem surfaced in 1.75.0 so I still think there's a bug (or undocumented fix) that contributes to this issue. May I suggest to re-open the issue?
following up - this is still an issue and there's no fix nor a workaround. Can you please re-open the issue so that someone can give it a second look?
Yep, thanks for the ping. This was hanging out in my notification queue but forgot to reopen it