vscode launch.json debug and open specific url

this one also works for me on VSCode 1.39.2

// 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+)",
    "uriFormat": "%s/swagger"
}, 

I tried the following and it seems to work

"launchBrowser": {
"enabled": true,
"args": "${auto-detect-url}/swagger",

This one works for me:

  "launchBrowser": {
    "enabled": true,
    "args": "${auto-detect-url}",
    "windows": {
      "command": "cmd.exe",
      "args": "/C start ${auto-detect-url}/swagger"
    }
  }