-
Notifications
You must be signed in to change notification settings - Fork 333
Debugging
Node.js version >= 6 have an inspector feature enabled as default.
To start debugging, run pump.io with the --inspect flag
node --inspect bin/pump -c pump.io.json
Next, open “about:inspect” in an Chromium-based browser, if you don't like Chromium you can use the CLI inspector to debugging.
node --inspect bin/pump -c pump.io.json
and in other terminal
node inspect localhost:9230
The 9230
is the port of forked processes.
Debugging in Node.js version =< 5 can be done via the Node Inspector https://github.com/node-inspector/node-inspector
node-debug pump
If you have problems with cluster mode you can try setting the child processes to one
"children": 1,
Also, you can try this patch https://github.com/e14n/pump.io/pull/1119 if the error persists.
Any Blink-based browser should work to connect to the debugger on http://127.0.0.1:8080/?ws=127.0.0.1:8080&port=5858
Wait for the fork and switch to the child process http://127.0.0.1:8080/?ws=127.0.0.1:8080&port=5859
Alternative in Node.js version =< 5 is to use node debug
node bin/pump -c pump.io.json
Debugger listening on port 5859
and then in a different window:
node debug localhost:5859