View the console to see logging.
The RTCPeerConnection objects pc1 and pc2 are in
global scope, so you can inspect them in the console as well.
For more information about RTCDataChannel, see Getting Started With WebRTC.
From Chrome 151 to Chrome 156 until November 17th there is a SNAP origin trial which you can register for at the Chrome origin trials page. This sample uses an origin trial token added in webrtc/samples#1735 to experimentally enable SNAP.
To inspect the SCTP traffic, start Chrome with logging enabled:
chrome --enable-logging --v=1
The logs are written to a file whose location depends on your platform; see where to find Chrome logs.
Then grep the Chrome logs for SCTP_PACKET and turn the result into a pcap
with text2pcap:
text2pcap -D -u 1001,2001 -t %H:%M:%S.%f log.txt sctp.pcap