React Native Debugging tips and tricks – codeburst

#reactnative Debugging tips and tricks – codeburst

  • Starting at the beginningThe first step in getting the devtools up and running for your app is to hit Cmd+D(iOS) or Cmd+M(Android) while the simulator is open and click ‘Debug JS Remotely’ like so: – As you can see, this should then trigger the React native debugger tab to open…
  • I don’t know what the keyboard shortcut to do this is in Windows is but I’m sure it’s easily Googleable.
  • One thing to bear in mind as regards keeping this debugger open is that if you have to kill your app for some reason and start it again, they may slow down your app a lot when you relaunch it.
  • But, sometimes the Cmd+D/M shortcut doesn’t work when you’re app is launching.
  • React Native recently introduced a copy keyboard shortcut into the simulator, but it doesn’t work perfectly.

You may be wondering why you should learn debugging tools. The truth is that for a lot of cases they are overkill and there are less overwhelming means of finding out where your program is…

React Native Debugging tips and tricksYou may be wondering why you should learn debugging tools. The truth is that for a lot of cases they are overkill and there are less overwhelming means of finding out where your program is failing(I’m looking at you print statements). However, as your app becomes more and more unwieldy you will need to start employing the services of a debugger.

The Chrome dev toolsA lot of the devtools including the debugger is still confusing to me. However, this is part and parcel of being a developer, and the more comfortable in environments you don’t fully understand you can be, the further you’ll go. This goes for listening to people who are explaining concepts to you have that you have no clue about too. It’s the times when you feel like everything is going over your head that are the times when you are learning the most, your brain is just processing information too fast.

Starting at the beginningThe first step in getting the devtools up and running for your app is to hit Cmd+D(iOS) or Cmd+M(Android) while the simulator is open and click ‘Debug JS Remotely’ like so:

As you can see, this should then trigger the React native debugger tab to open in Chrome, as long as that’s your default browser. I don’t know what the keyboard shortcut to do this is in Windows is but I’m sure it’s easily Googleable. One thing to bear in mind as regards…

React Native Debugging tips and tricks – codeburst