Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i view EventSource listeners in Chrome DevTools?

I have checked the Event Listeners Tab, but it doesn't seem to show server sent event listeners.

const sse = new EventSource('/api/v1/sse');
sse.addEventListener("notice", function(e) {
    console.log(e.data)
})

Having written the above code, is there a way to monitor all my sse named events & listeners using Chrome DevTools?

like image 825
Mark Girgis Avatar asked Apr 10 '26 22:04

Mark Girgis


1 Answers

Apps like ChatGPT and Anthropic's Claude use SSE over fetch not the built-in EventSource (probably by using @microsoft/fetch-event-source). It's known that you can't see EventSource in DevTools.

However, to see these in Chrome Dev Tools, I could install and enable a chrome extension: SSE viewer.

How the extension works

  • listen to all network requests (using a service worker),
  • detect requests with headers containing accept=text/event-stream, and
  • replaying the responses to these to a new EventSource that DevTools can record
like image 140
Ben Butterworth Avatar answered Apr 12 '26 13:04

Ben Butterworth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!