{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "WEB: Vite (Chrome)",
      "type": "pwa-msedge",
      "request": "launch",
      "url": "http://localhost:5173",
      "webRoot": "${workspaceFolder}/apps/web",
      "sourceMaps": true
    },
    {
      "name": "SERVER: Run in Development Mode",
      "type": "node",
      "request": "launch",
      "runtimeExecutable": "pnpm",
      "runtimeArgs": ["run", "dev", "--filter", "server"],
      "console": "integratedTerminal"
    },
    {
      "name": "SERVER: Run in Production Mode",
      "type": "node",
      "request": "launch",
      "runtimeExecutable": "npm",
      "runtimeArgs": ["run", "start"],
      "console": "integratedTerminal",
      "preLaunchTask": "npm: build"
    },
    {
      "name": "Attach to Turbo Server API (ts-node-dev)",
      "type": "node",
      "request": "attach",
      "port": 9229,
      "restart": true,
      "protocol": "inspector",
      "skipFiles": ["<node_internals>/**"],
      "sourceMaps": true,
      "outFiles": [
        "${workspaceFolder}/apps/api/src/**/*.ts",
        "${workspaceFolder}/modules/*/src/**/*.ts",
        "${workspaceFolder}/packages/*/src/**/*.ts"
      ]
    },
    {
      "name": "Turbo: debug server-side + modules + packages",
      "type": "node",
      "request": "launch",
      "program": "${workspaceFolder}/apps/server/src/index.ts",
      "runtimeArgs": ["-r", "ts-node/register"],
      "envFile": "${workspaceFolder}/apps/server/.env",
      "env": {
        "NODE_ENV": "development",
        "NODE_OPTIONS": "--inspect=0"
      },
      "skipFiles": ["<node_internals>/**"],
      "sourceMaps": true,
      "outFiles": [
        "${workspaceFolder}/apps/server/**/*.js",
        "${workspaceFolder}/modules/**/dist/**/*.js",
        "${workspaceFolder}/packages/**/dist/**/*.js"
      ],
      "cwd": "${workspaceFolder}"
    },
    {
      "name": "Debug Server",
      "type": "node",
      "request": "launch",
      "program": "${workspaceFolder}/apps/server/src/index.ts",
      "runtimeArgs": ["--require", "tsconfig-paths/register", "--inspect"],
      "cwd": "${workspaceFolder}",
      "outFiles": ["${workspaceFolder}/**/*.js"],
      "sourceMaps": true,
      "envFile": "${workspaceFolder}/apps/server/.env",
      "internalConsoleOptions": "openOnSessionStart"
    },
    {
      "name": "Attach to Server",
      "type": "node",
      "request": "attach",
      "port": 9229,
      "restart": true,
      "protocol": "inspector",
      "skipFiles": ["<node_internals>/**"],
      "sourceMaps": true,
      "outFiles": [
        "${workspaceFolder}/apps/server/dist/**/*.js",
        "${workspaceFolder}/packages/*/dist/**/*.js",
        "${workspaceFolder}/modules/*/dist/**/*.js"
      ]
    }
  ]
}
