{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug Frontend (UI & Widgets)",
      "request": "launch",
      "type": "chrome",
      // Needs to be updated when environmentUrl is changed in app.config.ts
      "url": "{{gatewayURL}}ui/apps/local-dev-server/?locationAppIds=http%3A%2F%2Flocalhost%3A3000%2Fui%2Clocal-dev-server",
      "pathMapping": {
        "/": "${workspaceFolder}",
        "localhost:3000/": "${workspaceFolder}",
        "/widgets/actions": "${workspaceFolder}",
        "localhost:3000/widgets/actions": "${workspaceFolder}",
        "/widgets/settings": "${workspaceFolder}",
        "localhost:3000/widgets/settings": "${workspaceFolder}"
      },
      "preLaunchTask": "Watch"
    },
    {
      "name": "Debug Backend (Functions & Actions)",
      "request": "launch",
      "runtimeExecutable": "npm",
      "runtimeArgs": ["run-script", "start"],
      "type": "node",
      "resolveSourceMapLocations": ["**/*.js", "**/*.ts"],
      "runtimeSourcemapPausePatterns": ["**/api/**/*", "**/actions/**/*"]
    },
    {
      "name": "Attach to Chrome",
      "port": 9222,
      "request": "attach",
      "type": "chrome",
      "pathMapping": {
        "/": "${workspaceFolder}",
        "localhost:3000/": "${workspaceFolder}"
      }
    }
  ]
}
