Debugging¶
Tips for debugging Atlas ERP locally.
VS Code Debugging¶
The repository includes a .vscode/launch.json file configured for both the backend and frontend.
- Open the Run and Debug panel in VS Code.
- Select "Debug NestJS API" or "Debug Next.js Web".
- Press Play. You can now set breakpoints directly in your
.tsor.tsxfiles.
Debugging Prisma¶
To see exactly what SQL queries Prisma is executing:
In apps/api/src/common/services/prisma.service.ts, add the log property to the constructor:
Inspecting Redis / BullMQ¶
If background jobs are failing, you can inspect the Redis queues using a GUI tool like RedisInsight or Another Redis Desktop Manager.
Connect to localhost:6379. BullMQ stores data with keys prefixed by bull:. Look for keys ending in :failed to see job error stack traces.