thanks in advance your your help; I rather a newbie with RN and Android (i used create-native init to create project).
Issue 1: when i first ctrl+M and choose "Debug JS Remotely" it attempts [http://10.0.2.2:8081/debugger-ui] but hangs indefinitely.
Issue 2. and when I finally give up and instead manually visit [http://localhost:8081/debugger-ui/], I have no way to revert AVD from "white screen of death"..ive tried "Stop Remote JS Bebugging", "Reload" etc....but end of having to use "react-native run-android" to refresh
Issue 3: Once I finally have [http://localhost:8081/debugger-ui/] displaying the desired "Debugger session #0 active" and I go into dev tools --> Sources --> Network --> debuggerWorker.js.....I don't see my folders/files listed. See screenshot.
RN is hard enough without being able to debug!
Select Tools → Developer Tools from the Chrome Menu to open the Developer Tools. You may also access the DevTools using keyboard shortcuts ( ⌘⌥I on macOS, Ctrl Shift I on Windows). You may also want to enable Pause On Caught Exceptions for a better debugging experience.
When the app runs on a real device, simply shake the device. Now, a menu will appear and you need to click on “Debug JS Remotely” to open the Google Chrome debugger. Thereafter, press 'Command+Option+I' on Mac or 'Ctrl+Shift+I' on Windows to open Developer Tools. You can now use console statements and debug the app.
To inspect elements, open your app in Simulator > press Cmd+D > select Show Inspector. Save this answer.
This solution worked for me:
ctrl+m
on your emulator.Dev Settings
.User JS Delta
npm run android
)This is an issue with the of latest version of react-native (0.54).
After some investigation, I found there are two ways to workaround this issue.
"dependencies": {
"react": "16.2.0",
"react-native": "0.52.2"
},
Then run these commands:
cd AwesomeProject
rm -rf node_modules android
npm install # this will bring folder node_modules back, with react/react-native of previous version
react-native eject # this will bring folder android back
react-native run-android
Use JS Deltas
as mentioned in this issue
But the author did not provide full steps, which led me working out option 1.
/works/StackOverflow/node_modules/react-native/scripts/launchPackager.command ; exit;
. (This is an important step).Now back to Chrome, you can find your source files listed under debuggerWorker.js
> localhost:8081
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With