One, debug node.js code
Debug interface
2. Debugging method
Start mediasoup server.js with the following command
//记着把xx.xx修改为自己的iP
node --inspect-brk=xx.xx.xx.xx:9229 server.js
The starting method of the app remains unchanged, and it is still gulp live.
Open the Goggle browser, enter chrome://inspect, click configure to configure the ip:port of the server just now, then click Done to confirm, and then click the inspect at the bottom.
As shown:
Two, add log
The default log of mediasoup is displayed on the console interface, and the log of the C++ layer is also sent to the node.js layer through a pipeline for display.
in case