Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a keyboard shortcut to toggle/show Inspector in React Native?

While building the UI of an app in React Native, I tend to use Toggle/Show inspector a lot. To Toggle/Show inspector, I hit CMD + D on iOS and CMD + M on Android to open the menu and then I click on Toggle or Show Inspector.

Is there a keyboard shortcut for toggling the Inspector without opening the menu? For example, CMD + R reloads the app. I don't have to access the menu to do so.

If there are no shortcuts for the inspector, how can I assign a shortcut like CMD + R? Thanks in anticipation.

like image 622
shet_tayyy Avatar asked Aug 17 '17 06:08

shet_tayyy


People also ask

How do you inspect in react native?

In the simulator menu opened by "command + m" on Android and "command + d" on iOS you can find the "Debug JS remotely" position. The tool opened under "http://localhost:8081/debugger-ui" is the same one, as browser debugger, hidden under the "inspect" menu button.

How do I see console in react native?

For the android emulator, Click on the emulator screen and Press Control + M ( Ctrl + M ), After open the dialog option select Remote JS Debugging. This will open a resource, http://localhost:8081/debugger-ui on localhost. From there, use the Chrome Developer tools JavaScript console to view console.

How to toggle/show Inspector in React Native?

Bookmark this question. Show activity on this post. While building the UI of an app in React Native, I tend to use Toggle/Show inspector a lot. To Toggle/Show inspector, I hit CMD + D on iOS and CMD + M on Android to open the menu and then I click on Toggle or Show Inspector.

Is there a keyboard shortcut for Toggle/show Inspector without opening the menu?

To Toggle/Show inspector, I hit CMD + D on iOS and CMD + M on Android to open the menu and then I click on Toggle or Show Inspector. Is there a keyboard shortcut for toggling the Inspector without opening the menu? For example, CMD + R reloads the app.

How do I open the developer menu in React Native?

Alternatively for Android, you can run the command adb shell input keyevent 82 to open the dev menu (82 being the Menu key code). The Developer Menu is disabled in release (production) builds. Fast Refresh is a React Native feature that allows you to get near-instant feedback for changes in your React components.

How do I use React-DevTools with Inspector?

Open the in-app developer menu and choose "Toggle Inspector". It will bring up an overlay that lets you tap on any UI element and see information about it: However, when react-devtools is running, Inspector will enter a collapsed mode, and instead use the DevTools as primary UI.


2 Answers

Yes, on iOS - CMD + Ctrl + Z -> Show Inspector

like image 147
gran33 Avatar answered Oct 14 '22 03:10

gran33


Cmd + i will bring up the Inspector (well, Debug) panel. Don't forget you can deactivate inspection mode by pressing the inspector button but still keep the panel on screen, which can be convenient when navigating around.

like image 35
sinewave440hz Avatar answered Oct 14 '22 05:10

sinewave440hz