The same debugging package that is available on the client side is available on the server as well.
The debugging option can be turned on with a Node environmental variable.
To get started with debugging on the server side, you will need to have Node and Socket.IO installed and an existing app that uses Socket.IO. To test this out, you can easily use any of the apps we built in the previous recipes in this chapter.
To get server-side debugging turned on, follow these steps:
DEBUGenvironmental variable as the first argument when you start your Node server, as shown in the following code:
DEBUG=* node server