To enable all debug logs, run your server using the
DEBUG=colyseus:* environment variable:
|Whenever unexpected (or expected, internally) errors happens on the server-side.
|Whenever a room is spanwed or disposed.
|Incoming and outgoing room messages
|The number of bytes and interval between patches broadcasted to all clients.
|Incoming and outgoing connections
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