6

I have been developing with React Native and in the past I was able to debug with Chrome devtools, though it was often sub-optimal and really affected application performance.

Know Chrome devtools just don't work. I try setting breakpoints and they don't set, or jump to some random line far below where I wanted it. I try adding "debugger;" to the code and the debugger does not stop on it.

Nothing seams to work and I have been using console.warn as my debugging, which is not awesome. I have read the docs etc. Any help would be welcome.

Hamicorn Fury
  • 751
  • 6
  • 8
  • Did you ever get this working? I am having similar problems: https://stackoverflow.com/questions/50115947/react-native-debugging-with-async-await – Mikeyg36 May 01 '18 at 19:06

1 Answers1

4

Ensure that "JS Dev mode" is on and and "JS minify" is off in Dev settings (Shake menu). In the past this has happened to me on many occasions where I would turn Dev mode off and forget. Breakpoints will not be hit if it's off.

naqvitalha
  • 793
  • 5
  • 9
  • I have made sure of that. The problem seems like there is just inconsistent behavior for the Chrome dev tools. There is talk on RN github too [here](https://github.com/facebook/react-native/issues/10729#issuecomment-259638512) and [here](https://github.com/aksonov/react-native-router-flux/issues/199#issuecomment-239482081). – Hamicorn Fury Nov 17 '16 at 04:48