How to do network tracking or debugging WebRTC peer-to-peer connection

A-letubby picture A-letubby · Jul 8, 2013 · Viewed 30.3k times · Source

I am wondering that there is the tool or any method I can see what underlying WebRTC peer-to-peer connection?

For simple example, if I am implementing video chat using webrtc, all connection (offer, answer, ice) are established but I can't see the video streaming, how can I debug and see that there is any packet or something sending between these two peers or not.

Answer

tomtheengineer picture tomtheengineer · Jul 8, 2013

If you're using Chrome, you can navigate to chrome://webrtc-internals. This will show you the offer, answer, ICE states, and statistics about the connection (once it has been established).

For more in-depth debugging, you can see logs of all the STUN pings between candidates by starting Chrome with the following flags:

--enable-logging --v=4

The logs will be in the chrome_debug.log file in your user data directory: http://dev.chromium.org/user-experience/user-data-directory