Debugging
Tips for debugging issues in local development.
Viewing logs
When running npm run dev, logs from all services appear in your terminal. For structured logging, metrics, and distributed tracing, see Observability.
To view Docker container logs separately:
Hot reload
Services automatically restart when you save changes. The generated docker-compose.yml mounts your source code:
If changes aren't picked up:
- Check the file is inside
src/ - Restart:
Ctrl+Cthennpm run dev
Database access
pgAdmin (built-in)
tsdevstack automatically generates pgAdmin with all your databases pre-configured:
All service databases appear in the sidebar. Database credentials are pre-loaded via pgpass, so clicking a database connects automatically - no password prompts.
Prisma Studio
Each service with a database has a generated .env file with DATABASE_URL. Run Prisma Studio for a service:
Opens at http://localhost:5555 with a visual interface for browsing and editing data. Run from the service directory to use its .env file.
CLI access
Each service has its own database container. Connect via Docker:
Or directly (if you have psql installed):
Other GUI tools
You can also use DBeaver, TablePlus, or similar tools:
Ports are auto-assigned starting from 5432. Check docker-compose.yml for actual port mappings. Passwords are generated by the framework and stored in .secrets.local.json.
Common issues
Port already in use
Container won't start
Check logs for the specific service:
Common causes: missing env vars, syntax errors, database not ready.
Kong returns 502
The gateway can't reach the backend. Check the service is running:
If services are unhealthy, regenerate configs and restart:
TypeScript errors
Check compilation:
Debug checklist
- Check logs:
docker compose logs -f - Verify containers:
docker compose ps - Regenerate configs:
npx tsdevstack sync - Restart:
docker compose down && npm run dev - Rebuild:
docker compose build --no-cache