You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Open browser console, check for "DrawDB client connected" in backend logs
308
-
4. Use MCP Inspector to test tools: `pnpm backend:inspector` (requires separate STDIO mode)
368
+
4. Use MCP Inspector to test tools: `pnpm backend:inspector` (STDIO mode)
369
+
370
+
**For debugging with breakpoints:**
371
+
372
+
1. Run `npm run inspector:stdio:debug` in `apps/backend` directory
373
+
2. Attach your IDE debugger to port 9229
374
+
3. Inspector pauses at startup waiting for debugger attachment
309
375
310
376
### Debugging Docker Build
311
377
@@ -335,12 +401,14 @@ function MyComponent() {
335
401
### Common Gotchas
336
402
337
403
-**WebSocket connection fails**: Check that `VITE_REMOTE_CONTROL_ENABLED=true` and backend is running
338
-
-**MCP tools timeout**: Default timeout is 30s (configured in `DrawDBClientService:16`)
404
+
-**MCP tools timeout**: Default timeout is 30s (configured in `DrawDBClientService:15`)
339
405
-**Docker nginx issues**: Nginx runs as non-root user `nodejs:nodejs`, requires proper permissions
340
406
-**Build failures**: Run `pnpm clean` then `pnpm install` to reset
341
407
-**Turborepo cache issues**: Delete `.turbo` directory to clear cache
342
-
-**Area/Note deletion**: Areas and notes use numeric array indices internally but are looked up by `name`/`title` for MCP operations
343
-
-**Field IDs**: All entities (tables, fields, relationships) use `nanoid()` for ID generation
408
+
-**Area/Note lookup**: Areas and notes use numeric IDs internally but MCP tools look them up by `name`/`title`. When deleting, the ID is converted to integer for array lookup (`parseInt(params.id, 10)`)
409
+
-**Entity IDs**: All entities (tables, fields, relationships, enums, types) use `nanoid()` for unique ID generation (imported from `nanoid` package)
410
+
-**Remote control enabled check**: Frontend checks `import.meta.env.VITE_REMOTE_CONTROL_ENABLED` to enable WebSocket connection (see `useRemoteControl.js:34`)
411
+
-**Command ID format**: Backend generates unique command IDs using `cmd_${timestamp}_${random}` pattern for request/response matching
0 commit comments