Odoo uses service workers for handling sockets, AFAIK service workers are background workers, and their network activity does not appear on the network tab when inspecting a page.
I am curious to see the massages sent and received within the websocket, but could never view it in chrome DevTools.
How to show Odoo’s websocket request in any browser dev tools?
Or how to modify the Javascript code to make the request be sent normally without using service workers?
It turns out Odoo is processing websockets form a window.SharedWorker
or a window.Worker
(in chromium/linux it was SharedWorker). And this is a background worker, that is run on a separate thread. Because of that, all requests and console logs do not appear on the normal inspect window.
To see that worker in chrome/chromium, you can visit chrome://inspect/#workers
then search for a worker named odoo:websocket_shared_worker
. Click the inspect button and then an inspect window for that worker should be opened. Note: to see the websocket request, you might have to logout and re-login to your Odoo account, or you might need to even restart the browser.
AFAIK firefox does not have a network inspector for shared worker yet, but you can see console log, and set breakpoints.