Thank you, Anthony Chu! I got it working after a lot of fiddling.
My tasks.json under my VS Code project now looks like:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "swa start",
"command": "swa start http://localhost:8080/ --api http://localhost:7071 --run runserve.cmd",
"isBackground": true,
"problemMatcher": [],
"options": {
"cwd": "${workspaceFolder}"
},
"dependsOn": []
}
]
}
runserve.cmd (this was needed because having 'npm run serve' as the argument to the saw --run arg wasn't working for some weird reason, like the cmd line was being chopped off?):
npm run serve
And finally what brings it all together is launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Edge",
"request": "launch",
"type": "pwa-msedge",
"url": "http://localhost:4280",
"webRoot": "${workspaceFolder}/src",
"presentation": {
"hidden": true,
"group": "",
"order": 1
},
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*"
}
}
],
"compounds": [
{
"name": "Launch Static Web App",
"configurations": [
"Launch Edge"
],
"stopAll": true,
"preLaunchTask": "swa start"
}
]
}
Now my two VS Code projects (Vue.js SWA project and my Azure Functions project) are co-existing very happily, and by using the SWA emulator I can get access to built-in authentication mocking, routing and all that good stuff. I can debug the Vue.js smoothly inside VS Code (NOT the browser!) and also debug the Azure C# Functions smoothly in my other project. I'm a very happy panda! Thanks Anthony for your great assistance.