在VSCode中使用一个配置/任务启动.NetCore和Angular

时间:2020-05-28 19:20:57

标签: visual-studio-code vscode-debugger angular-fullstack vscode-tasks

我正在尝试优化我的应用程序的开发人员体验。我有一个带有.NetCore API和Angular SPA的单一存储库。要开始调试,我打开2个Terminals并cd进入目录以执行ng serve / dotnet watch run,然后附加chrome和.net调试器。 我想使用一个劳克配置实现这一点。 我设法在2个终端上启动任务,但无法同时使两个调试器正常工作。

我的启动json

<input type="number" id="myNumber" name="myNumber" step="any" onkeypress="onKeypress(event)" oninput="onInput(event)" onselect="onSelect(event)">

我的Tasks.json

    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command:pickProcess}"
        },
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome",
            "url": "http://localhost:4200",
            "webRoot": "${workspaceFolder}/DatingApp-SPA"
        }
    ],
    "compounds": [
        {
            "name": "Server/Client",
            "configurations": ["Launch Chrome", ".NET Core Attach"],
            "preLaunchTask": "run dev",
        }
    ]
}

0 个答案:

没有答案