Cant debug with react native debugger

beratuslu picture beratuslu · Jul 20, 2018 · Viewed 7.9k times · Source

I am starting project as instructed in the readme file (mcnamee/react-native-starter-kit). I integrated my firebase with app when I signup it stucks at spinner... though saves email and password to firebase and it signs in without problem. I want to debug whats going on when I hit the signup button but it doesnt show any action etc nor in the react native debugger app. Why react native debugger cant connect to my app. How can I fix this issue?

enter image description here enter image description here

Answer

Andrew picture Andrew · Jul 20, 2018

You can only have one debugger attached at a time. If you are using the debugger in a web browser. You cannot use React Native Debugger.

The simplest solution is to make sure that you have React Native Debugger running before you do react-native run-ios And you should connect automatically to the React Native Debugger. If it doesn’t connect you can always press cmd+d to connect to the debugger.

If you are already connected to the web browser debugger. Press cmd+d to bring up the menu on the simulator, disable remote debugging. Close the web browser. Launch React Native Debugger. Press cmd+d and enable remote debugger, this should connect you to the React Native Debugger.

Regards to the information in the console. Both debugging optionswill give you the same information. If you are wanting to debug what is happening in more detail you’ll need to use the built in Debugger in your IDE and step through the lines of code or put in some well placed console.logs().