jhen0409 / react-native-debugger

The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools
MIT License
10.36k stars 809 forks source link

Remote JS #804

Open JAisonsudha opened 2 months ago

JAisonsudha commented 2 months ago

how to enable Remote Js In my emulator ,and i doesn't have remote js options in my emulator

Ashishpal438 commented 2 months ago

import NativeDevSettings from 'react-native/Libraries/NativeModules/specs/NativeDevSettings'

Assign this to a dev-only button or useEffect call :

const connectToRemoteDebugger = () => {
  NativeDevSettings.setIsDebuggingRemotely(true);
};

I used this in my App.tsx file in a useEffect

useEffect(() => {
  connectToRemoteDebugger();
},[])

`