react-native-debugger icon indicating copy to clipboard operation
react-native-debugger copied to clipboard

See Websocket traffic on WS Network tab

Open mschipperheyn opened this issue 6 years ago • 6 comments

React Native Debugger app version: 0.7.12 React Native version: 0.49.5 Platform: iOS Is real device of platform: No Operating System: macOS

We use Websockets for some communication with our server, but it doesn't show up under WS in the Network tab on the iOS Simulator. Normal fetch traffic does. Any reason for this or is there a way to make this traffic visible?

mschipperheyn avatar Nov 16 '17 20:11 mschipperheyn

Currently we only support XHR for that with some limitations. We could try replace RN's WebSocket for enabled Network inspect.

jhen0409 avatar Nov 17 '17 04:11 jhen0409

@jhen0409 Could you expand your answer? What did you mean for "try to replace RN's"?

dakiesse avatar May 26 '18 14:05 dakiesse

hello @jhen0409 ! can u provide more information about your suggestion?

v0lume avatar Nov 10 '18 11:11 v0lume

Hey, we had a PR for this: https://github.com/jhen0409/react-native-debugger/pull/322 But there is a drawback that a lot of warnings are being thrown when you close react inspector. If anyone is interested you could try to make it work.

Gongreg avatar May 27 '19 04:05 Gongreg

if (process.env.NODE_ENV === 'development') { GLOBAL.XMLHttpRequest = GLOBAL.originalXMLHttpRequest || GLOBAL.XMLHttpRequest GLOBAL.WebSocket = GLOBAL.originalWebSocket || GLOBAL.WebSocket }

sunlei4076 avatar Oct 18 '19 05:10 sunlei4076

@sunlei4076 Would be nice if you could write some little explanation of what it does. 👍🏽

kornelijussl avatar Apr 29 '22 16:04 kornelijussl