You can use the the built-in inspector from Node.js to debug your application.
Read more about Debugging Node.js Applications.
Using the inspector on production environment¶
Be careful when using the inspector on production. Using memory snapshots and breakpoints will impact the experience of your users directly.
1. Connect to the remote server:
2. Check the PID of the Node process
3. Attach the inspector on the process
4. Create a SSH tunnel from your local machine to the remote inspector
Your production server should now appear on
To enable all debug logs, run your server using the
DEBUG=colyseus:* environment variable:
colyseus:errors: Whenever unexpected (or expected, internally) errors happens on the server-side.
colyseus:matchmaking: Whenever a room is spanwed or disposed.
colyseus:message: Incoming and outgoing room messages
colyseus:patch: The number of bytes and interval between patches broadcasted to all clients.
colyseus:connection: Incoming and outgoing connections