Closed lttb closed 3 years ago
Apologies for the late reply @lttb. Yes, unfortunately that's a known issue with this approach: chrome dev tools apparently only works with the native EventSource. What we've done in Azure is to put our own logging in the onmessage
callback, for example:
fetchEventSource('/api/sse', {
onmessage(msg) {
if (process.env.NODE_ENV === 'development') {
console.debug('[EventSource]', msg);
}
This is definitely less convenient, but has been enough for us to debug issues the last couple years.
there is a chrome extension to view EventStream in devtools. https://github.com/maltoze/sse-viewer
Curious has anyone opened a bug/feature in the Chrome project for this?
Couldn't find a solution, so I logged all data in the console for easier debugging.
Here is my log code. group all data in a table in the console panel.
https://gist.github.com/huoyixin/82a8deb64aa6b380f89d6048a44dda11
Looks like Chromium team has been actively working on the issue recently: https://bugs.chromium.org/p/chromium/issues/detail?id=1025893
Comment on the Chromium Issue tracker:
The fix is already available in Chrome Canary starting with 123.0.6283.0. M123 will be beta on February 21st and stable on March 19th.
Hi! Thank you very much for your work.
I was wondering if you have ever faced with this issue: "Event Stream" tab is empty in Chrome dev tools:
It seems that this problem is related to these issues:
At the moment, it looks like that the events will be shown only if the native
EventSource
used, but if you could share any workarounds or ideas about it, that would be amazing. Thanks!