我有两个在可视代码中打开了共同root的项目。首先是.net核心webapi。第二个是react / redux等的前端。现在,当我想运行应用程序时,我需要手动从控制台运行  npm start'然后从可视代码运行webapi。如何通过配置vs代码来实现这一目标?
最后我希望在点击调试之后,我将重新编译并部署webapi并重建并与前端应用程序相同。然后在所需页面中打开浏览器。
有一个想法,我可以运行一些可以处理它的脚本,但我更愿意使用纯粹的代码配置。
我认为我需要修改我的launch.json文件。不知道怎么回事。 这是launch.json https://pastebin.com/9a66n3Rx
"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}/server/bin/Debug/netcoreapp2.0/webapi.dll",
"args": [],
"cwd": "${workspaceFolder}/server",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart",
"launchBrowser": {
"enabled": true,
"args": "${auto-detect-url}",
"windows": {
"command": "cmd.exe",
"args": "/C start ${auto-detect-url}"
},
"osx": {
"command": "open"
},
"linux": {
"command": "xdg-open"
}
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
前端应用程序位于" $ {workspaceFolder} / client"夹