Visual studio code 在vscode中停止调试后,ng serve仍在运行

Visual studio code 在vscode中停止调试后,ng serve仍在运行,visual-studio-code,angular-cli,Visual Studio Code,Angular Cli,我正在做一个关于vs代码的angular和.net核心项目 调试并没有问题,但当我停止调试时,进程仍在运行,占用了我笔记本的内存 我必须手动杀死它 如何设置vscode调试器在停止调试后终止ng serve进程 注意:ng serve在每个调试会话中运行不同的端口。 My launch.json { // Use IntelliSense to find out which attributes exist for C# debugging // Use hover for the descr

我正在做一个关于vs代码的angular和.net核心项目

调试并没有问题,但当我停止调试时,进程仍在运行,占用了我笔记本的内存

我必须手动杀死它

如何设置vscode调试器在停止调试后终止ng serve进程

注意:ng serve在每个调试会话中运行不同的端口。 My launch.json

{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
    {
        "name": ".NET Core Launch (web)",
        "type": "coreclr",
        "request": "launch",
        "preLaunchTask": "build",
        // If you have changed target frameworks, make sure to update the program path.
        "program": "${workspaceFolder}/EFS/bin/Debug/netcoreapp3.1/EFS.dll",
        "args": [],
        "cwd": "${workspaceFolder}/EFS",
        "stopAtEntry": false,
        // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
        "serverReadyAction": {
            "action": "openExternally",
            "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
        },
        "env": {
            "ASPNETCORE_ENVIRONMENT": "Development"
        },
        "sourceFileMap": {
            "/Views": "${workspaceFolder}/Views"
        }
    },
    {
        "name": ".NET Core Attach",
        "type": "coreclr",
        "request": "attach",
        "processId": "${command:pickProcess}"
    }
]
}

tasks.json

{
"version": "2.0.0",
"tasks": [
    {
        "label": "build",
        "command": "dotnet",
        "type": "process",
        "args": [
            "build",
            "${workspaceFolder}/EFS/EFS.csproj",
            "/property:GenerateFullPaths=true",
            "/consoleloggerparameters:NoSummary"
        ],
        "problemMatcher": "$msCompile"
    },
    {
        "label": "publish",
        "command": "dotnet",
        "type": "process",
        "args": [
            "publish",
            "${workspaceFolder}/EFS/EFS.csproj",
            "/property:GenerateFullPaths=true",
            "/consoleloggerparameters:NoSummary"
        ],
        "problemMatcher": "$msCompile"
    },
    {
        "label": "watch",
        "command": "dotnet",
        "type": "process",
        "args": [
            "watch",
            "run",
            "${workspaceFolder}/EFS/EFS.csproj",
            "/property:GenerateFullPaths=true",
            "/consoleloggerparameters:NoSummary"
        ],
        "problemMatcher": "$msCompile"
    }
]
}