{ "version": "2.0.0", "tasks": [ { "label": "Clean Debug Ports", "type": "shell", "command": "bash ${workspaceFolder}/.vscode/cleanup-ports.sh", "problemMatcher": [] }, { "label": "Wait for Backend Ready", "type": "shell", "command": "bash -lc 'for i in {1..120}; do if (echo > /dev/tcp/127.0.0.1/3001) >/dev/null 2>&1; then exit 0; fi; sleep 1; done; echo \"Backend not ready on :3001\"; exit 1'", "problemMatcher": [] }, { "label": "Start Backend (watch + inspect)", "type": "shell", "command": "npx tsx watch --inspect=9229 ./src/index.ts", "isBackground": true, "options": { "cwd": "${workspaceFolder}/Server", "env": { "PORT": "3001" } }, "dependsOn": "Clean Debug Ports", "problemMatcher": [ { "owner": "backend-ready", "fileLocation": ["absolute"], "pattern": { "regexp": "^(.*)$", "message": 1 }, "background": { "activeOnStart": true, "beginsPattern": "Starte Datenbankinitialisierung|Server läuft unter http://localhost:3001", "endsPattern": "NotificationScheduler erfolgreich initialisiert" } } ], "presentation": { "reveal": "always", "panel": "dedicated", "clear": false } }, { "label": "Start Vite (after backend ready)", "type": "npm", "script": "frontend", "isBackground": true, "options": { "cwd": "${workspaceFolder}/Client" }, "dependsOn": "Wait for Backend Ready", "dependsOrder": "sequence", "problemMatcher": [ { "owner": "vite", "fileLocation": ["relative", "${workspaceFolder}"], "pattern": { "regexp": "^(.*)$", "file": 1, "message": 1 }, "background": { "activeOnStart": true, "beginsPattern": "VITE|ready in", "endsPattern": "localhost:3000" } } ], "presentation": { "reveal": "always", "panel": "dedicated", "clear": false } } ] }