Close multiple debug configurations by closing window (not using stopping/shift f5)

  Kiến thức lập trình

I’m using VSCode’s Compounds to launch my Server and Client configurations. I’ve enabled ‘stopAll’ in the compound settings. Stopping the debugger (Shift + f5) closes both windows, but manually clicking ‘X’ on either windows closes that window but doesn’t close the other. How can I make both windows close when I close one?

Some additional notes; Client is a Monogame project, Server is a CLI app, and both projects are contained within a larger project

I’ve tried enabling ‘stopAll’ in the compound settings

Here are the two launch configs

{
    "name": "Server",
    "type": "coreclr",
    "request": "launch",
    "program": "${workspaceRoot}/Server/bin/Debug/net8.0/TOCServer.exe",
    "cwd": "${workspaceRoot}",
    "console": "externalTerminal",
    "preLaunchTask": "dotnet: build server",
},
{
    "name": "Client",
    "type": "coreclr",
    "request": "launch",
    "program": "${workspaceRoot}/Client/bin/Debug/net8.0-windows/TOCClient.exe",
    "cwd": "${workspaceRoot}",
    "console": "integratedTerminal",
    "preLaunchTask": "dotnet: build client",
    "logging": {
        "moduleLoad": false
    },
}

and here is the compound

{
    "name": "Server/Client",
    "configurations": ["Server", "Client"],
    "stopAll": true,
},

New contributor

Cj Simmons is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT