Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't launch Chrome DevTools in iOS simulator

Tags:

react-native

Using v8.2 simulator, Cmd+D always show the following error message

[RCTLog][tid:0x7fcc2bf4cb90][RCTRootView.m:68]>WebSocket debugger is not available. Did you forget to include RCTWebSocketExecutor?
like image 899
Leon Huang Avatar asked Mar 28 '15 07:03

Leon Huang


1 Answers

Finally, I found the root cause after I tried many different way to solve this problem.

For using Chrome DevTool to debug, iOS project need to import libraries RCTWebSocketDebugger.xcodeproj and libicucore.dylib.

In react-native examples, 2048, Movies, TicTacToe doesn't import these two libraries. That's why it always show error message "WebSocket debugger is not available. Did you forget to include RCTWebSocketExecutor?" in console.

enter image description here

  1. press + > Add Other... > <REACT_NATIVE_ROOT>/Libraries/RCTWebSocketDebugger/RCTWebSocketDebugger.xcodeproj
  2. press + > search RCTWebSocketDebugger.a > Add
  3. press + > search libicucore.dylib > Add
  4. press ⌘ + R in Xcode to run the project
  5. open Chrome URL http://localhost:8081/debugger-ui
  6. press ⌘ + D in iOS Simulator to enable debugging
like image 167
Leon Huang Avatar answered Oct 17 '22 02:10

Leon Huang