Skip to main content

Debugging Guide

Last Verified: February 2026
This guide covers the debugging tools and techniques available for each layer of the Equa platform — frontend, backend, database, and the AI gateway.

Frontend Debugging (equa-web)

Browser DevTools

  • React DevTools: Install the React Developer Tools browser extension to inspect component trees, props, state, and hooks.
  • Immutable.js Formatter: Install Immutable.js Object Formatter for Chrome. Enable “Custom Formatters” in DevTools Settings. This makes Immutable.js objects readable in the console (used in some legacy Redux state).
  • Network Tab: Monitor API calls to /api/* — the webpack dev server proxies these to equa-server on port 3000. Check request/response payloads and status codes here.
Source: equa-web/README.md (lines 47-50)

Webpack Dev Server

The dev server runs on port 8080 and proxies /api/* to http://localhost:3000. If API calls fail:
  1. Check that equa-server is running on port 3000
  2. Check the Network tab for the actual request URL and response
  3. Verify the proxy configuration in the webpack config

Source Maps

equa-web builds with source maps enabled (sourceMap: true in tsconfig.json). You can set breakpoints directly in TypeScript files using the browser DevTools Sources tab.

Backend Debugging (equa-server)

Node.js Inspector

Start the API server with the Node.js inspector enabled:
This runs node --inspect --require ts-node/register scripts/api.ts. Open chrome://inspect in Chrome to attach the debugger. Source: equa-server/package.json script start:debug

IDE Debugging (VS Code / WebStorm)

For debugging directly from your IDE, use these Node.js arguments with ts-node:
In VS Code, add a launch configuration:
Source: equa-server/README.md (lines 39-41)

Express Session Debugging

To debug session-related issues (login, auth, cookie problems):
This enables verbose Express session logging to stdout. Source: equa-server/README.md (lines 109-113)

Winston Logging

equa-server uses Winston for application logging (configured in equa-server/modules/common/src/). Log levels follow the standard Winston hierarchy: error, warn, info, verbose, debug, silly. Check the console output when running yarn start:dev for log messages from the application.

Database Debugging

TypeORM Query Logging

Enable SQL query logging by adding to your .env:
This tells TypeORM to print every SQL query and any errors to the console. Useful for debugging slow queries, missing data, or unexpected query patterns. Source: equa-server environment variable configuration

Direct Database Access

Connect to the PostgreSQL container directly:
Useful psql commands:

Checking Migration State

equa-server uses TypeORM’s auto-synchronization in development (DATABASE_SYNC environment variable). If the schema is out of sync:
  1. Stop the server
  2. Drop and recreate the database: docker-compose down && docker-compose up -d
  3. Run yarn init:db to reinitialize
For production, SQL migration scripts live in equa-server/modules/persistence/lab/sql/migrations/.

Gateway Debugging (equabot)

macOS Unified Logs

When the equabot gateway runs as the macOS menubar app, logs go to the macOS unified logging system. Query them with:
This script queries unified logs for the Equabot subsystem. It supports follow/tail/category filters. Source: equabot/CLAUDE.md macOS logs section

Process Inspection

Check if the gateway is running:
Check the gateway port:
Source: equabot/CLAUDE.md gateway debugging notes

WebSocket Debugging

To debug WebSocket connections between equa-web and the gateway:
  1. Open browser DevTools -> Network tab -> filter by “WS”
  2. Look for the WebSocket connection to ws://127.0.0.1:18789
  3. Click on it to see individual frames (messages sent/received)
  4. Check for connection errors or unexpected disconnects

Common Issues

Log Locations

Useful Debug Commands