Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Remote JS Debugging in React-Native

I realize that the normal way to disable debugging is by going to the developer menu. The problem is that since I turned on debugging for my app I am testing (React Native & Android emulator) I have been getting a white screen when the app loads with no information on the console and no ability to access the Dev menu to turn off the debugging.

So I am stuck. SInce JS debugging seens to be specific to the App I assume there is SOMEWHERE else either in the emulator or in react that I can turn it off.

Please advise? Thanks

like image 236
Gotts Avatar asked Nov 21 '16 11:11

Gotts


People also ask

How do I enable remote debugging in React Native?

In App Developer MenuOn Android emulator, you need to press command + M. Debug JS Remotely − Used for activating debugging inside browser developer console. Enable Live Reload − Used for enabling live reloading whenever your code is saved. The debugger will open at localhost:8081/debugger-ui.

How do I use React Native debugger with Expo?

The setup is as follows: Download React Native Debugger from the releases page. Open the app, press Cmd ⌘ + T or Ctrl + T to open a new window, then set the port to 19000. Start your app, open the in-app developer menu, and select “Debug JS Remotely.”

How do I debug in Vscode React Native?

You can launch your app either in Android or iOS with the standard commands you use. Once it is running, click the play button for that option to debug your app. This works when you are having trouble launching an emulator or simulator with a debug configuration, too.


1 Answers

I just had a similar problem - the remote debugger initialization kept crashing my app and I could not disable remote debugging via the in-app GUI.

After having uninstalled the app from the device (or emulator), remote debugging was disabled when I started the app again.

I assume, that the remote debugging flag is saved withtin the app's shared preferences (which get deleted after uninstall).

like image 112
max.mustermann Avatar answered Sep 29 '22 18:09

max.mustermann