wirepair / gcd

Unofficial implementation of the Google Chrome Remote Debugger in Go
MIT License
186 stars 31 forks source link

Add logging for DevTools websocket message handling #76

Closed eatdrinksleepcode closed 3 months ago

eatdrinksleepcode commented 3 months ago

These are changes that we made locally to aid in a recent troubleshooting effort. Mainly this adds logging when enqueuing events received from the DevTools websocket to be processed by dispatchEvents:

  1. Log when the event queue is full
  2. Debug log when a message is about to be enqueued. This identifies when the event was received from DevTools, which is helpful in cases when the processing is delayed (because the queue is full).
  3. Debug log when a message has been enqueued. In cases where the queue is full, this helps quantify the delay.