Skip to content

Commit 5fb9133

Browse files
authored
[docs] Update in-app dev menu instructions, consistently name as "Dev Menu" (#3692)
1 parent 48bb3af commit 5fb9133

15 files changed

+52
-43
lines changed

docs/_getting-started-linux-android.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ If everything is set up correctly, you should see your new app running in your A
158158
Now that you have successfully run the app, let's modify it.
159159

160160
- Open `App.tsx` in your text editor of choice and edit some lines.
161-
- Press the `R` key twice or select `Reload` from the Developer Menu (`Ctrl + M`) to see your changes!
161+
- Press the `R` key twice or select `Reload` from the Dev Menu (`Ctrl + M`) to see your changes!
162162

163163
<h3>That's it!</h3>
164164

docs/_getting-started-macos-android.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ If everything is set up correctly, you should see your new app running in your A
170170
Now that you have successfully run the app, let's modify it.
171171

172172
- Open `App.tsx` in your text editor of choice and edit some lines.
173-
- Press the `R` key twice or select `Reload` from the Developer Menu (`⌘M`) to see your changes!
173+
- Press the `R` key twice or select `Reload` from the Dev Menu (`⌘M`) to see your changes!
174174

175175
<h3>That's it!</h3>
176176

docs/_getting-started-windows-android.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ If everything is set up correctly, you should see your new app running in your A
191191
Now that you have successfully run the app, let's modify it.
192192

193193
- Open `App.tsx` in your text editor of choice and edit some lines.
194-
- Press the `R` key twice or select `Reload` from the Developer Menu (`Ctrl + M`) to see your changes!
194+
- Press the `R` key twice or select `Reload` from the Dev Menu (`Ctrl + M`) to see your changes!
195195

196196
<h3>That's it!</h3>
197197

docs/animations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,4 +672,4 @@ As mentioned [in the Direct Manipulation section](direct-manipulation), `setNati
672672

673673
We could use this in the Rebound example to update the scale - this might be helpful if the component that we are updating is deeply nested and hasn't been optimized with `shouldComponentUpdate`.
674674

675-
If you find your animations with dropping frames (performing below 60 frames per second), look into using `setNativeProps` or `shouldComponentUpdate` to optimize them. Or you could run the animations on the UI thread rather than the JavaScript thread [with the useNativeDriver option](/blog/2017/02/14/using-native-driver-for-animated). You may also want to defer any computationally intensive work until after animations are complete, using the [InteractionManager](interactionmanager). You can monitor the frame rate by using the In-App Developer Menu "FPS Monitor" tool.
675+
If you find your animations with dropping frames (performing below 60 frames per second), look into using `setNativeProps` or `shouldComponentUpdate` to optimize them. Or you could run the animations on the UI thread rather than the JavaScript thread [with the useNativeDriver option](/blog/2017/02/14/using-native-driver-for-animated). You may also want to defer any computationally intensive work until after animations are complete, using the [InteractionManager](interactionmanager). You can monitor the frame rate by using the In-App Dev Menu "FPS Monitor" tool.

docs/building-for-tv.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Game2048 extends React.Component {
8989
}
9090
```
9191

92-
- _Dev Menu support_: On the emulator, cmd-M will bring up the developer menu, similar to Android. To bring it up on a real Android TV device, press the menu button or long press the fast-forward button on the remote. (Please do not shake the Android TV device, that will not work :) )
92+
- _Dev Menu support_: On the emulator, cmd-M will bring up the Dev Menu, similar to Android. To bring it up on a real Android TV device, press the menu button or long press the fast-forward button on the remote. (Please do not shake the Android TV device, that will not work :) )
9393

9494
- _Known issues_:
9595

@@ -175,7 +175,7 @@ class Game2048 extends React.Component {
175175
}
176176
```
177177

178-
- _Dev Menu support_: On the simulator, cmd-D will bring up the developer menu, similar to iOS. To bring it up on a real Apple TV device, make a long press on the play/pause button on the remote. (Please do not shake the Apple TV device, that will not work :) )
178+
- _Dev Menu support_: On the simulator, cmd-D will bring up the Dev Menu, similar to iOS. To bring it up on a real Apple TV device, make a long press on the play/pause button on the remote. (Please do not shake the Apple TV device, that will not work :) )
179179

180180
- _TV remote animations_: `RCTTVView` native code implements Apple-recommended parallax animations to help guide the eye as the user navigates through views. The animations can be disabled or adjusted with new optional view properties.
181181

docs/debugging.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,32 @@ title: Debugging
55

66
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
77

8-
## Accessing the In-App Developer Menu
8+
## Accessing the Dev Menu
99

10-
You can access the developer menu by shaking your device or by selecting "Shake Gesture" inside the Hardware menu in the iOS Simulator. You can also use the `⌘D` keyboard shortcut when your app is running in the iOS Simulator, or `⌘M` when running in an Android emulator on macOS and `Ctrl+M` on Windows and Linux. Alternatively for Android, you can run the command `adb shell input keyevent 82` to open the dev menu (82 being the Menu key code).
10+
React Native provides an in-app developer menu which offers several debugging options. You can access the Dev Menu by shaking your device or via keyboard shortcuts:
1111

12-
![](/docs/assets/DeveloperMenu.png)
12+
- iOS Simulator: <kbd>Cmd ⌘</kbd> + <kbd>D</kbd> (or Device > Shake)
13+
- Android emulators: <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (macOS) or <kbd>Ctrl</kbd> + <kbd>M</kbd> (Windows and Linux)
1314

14-
> The Developer Menu is disabled in release (production) builds.
15+
Alternatively for Android devices and emulators, you can run `adb shell input keyevent 82` in your terminal.
1516

16-
## Enabling Fast Refresh
17+
![](/docs/assets/DevMenu.png)
1718

18-
Fast Refresh is a React Native feature that allows you to get near-instant feedback for changes in your React components. While debugging, it can help to have [Fast Refresh](fast-refresh.md) enabled. Fast Refresh is enabled by default, and you can toggle "Enable Fast Refresh" in the React Native developer menu. When enabled, most of your edits should be visible within a second or two.
19+
:::note
20+
The Dev Menu is disabled in release (production) builds.
21+
:::
1922

20-
## Enabling Keyboard Shortcuts
23+
## Enabling Fast Refresh
2124

22-
React Native supports a few keyboard shortcuts in the iOS Simulator. They are described below. To enable them on macOS, inside the Simulator app, open the I/O menu, select Keyboard, and make sure that "Connect Hardware Keyboard" is checked.
25+
Fast Refresh is a React Native feature that allows you to get near-instant feedback for changes in your React components. While debugging, it can help to have [Fast Refresh](fast-refresh.md) enabled. Fast Refresh is enabled by default, and you can toggle "Enable Fast Refresh" in the Dev Menu. When enabled, most of your edits should be visible within a second or two.
2326

2427
## LogBox
2528

2629
Errors and warnings in development builds are displayed in LogBox inside your app.
2730

28-
> LogBox is automatically disabled in release (production) builds.
31+
:::note
32+
LogBox is disabled in release (production) builds.
33+
:::
2934

3035
### Console Errors and Warnings
3136

@@ -55,7 +60,7 @@ When syntax error occurs the full screen LogBox error will automatically open wi
5560

5661
## Chrome Developer Tools
5762

58-
To debug the JavaScript code in Chrome, select "Debug JS Remotely" from the Developer Menu. This will open a new tab at [http://localhost:8081/debugger-ui](http://localhost:8081/debugger-ui).
63+
To debug the JavaScript code in Chrome, select "Open Debugger" from the Dev Menu. This will open a new tab at [http://localhost:8081/debugger-ui](http://localhost:8081/debugger-ui).
5964

6065
Select `Tools → Developer Tools` from the Chrome Menu to open the [Developer Tools](https://developer.chrome.com/devtools). 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](http://stackoverflow.com/questions/2233339/javascript-is-there-a-way-to-get-chrome-to-break-on-all-errors/17324511#17324511) for a better debugging experience.
6166

@@ -65,7 +70,7 @@ Select `Tools → Developer Tools` from the Chrome Menu to open the [Developer T
6570
6671
### Debugging using a custom JavaScript debugger
6772

68-
To use a custom JavaScript debugger in place of Chrome Developer Tools, set the `REACT_DEBUGGER` environment variable to a command that will start your custom debugger. You can then select "Debug JS Remotely" from the Developer Menu to start debugging.
73+
To use a custom JavaScript debugger in place of Chrome Developer Tools, set the `REACT_DEBUGGER` environment variable to a command that will start your custom debugger. You can then select "Open Debugger" from the Dev Menu to start debugging.
6974

7075
The debugger will receive a list of all project roots, separated by a space. For example, if you set `REACT_DEBUGGER="node /path/to/launchDebugger.js --port 2345 --type ReactNative"`, then the command `node /path/to/launchDebugger.js --port 2345 --type ReactNative /path/to/reactNative/app` will be used to start your debugger.
7176

@@ -127,7 +132,7 @@ If you prefer to avoid global installations, you can add `react-devtools` as a p
127132

128133
### Integration with React Native Inspector
129134

130-
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:
135+
Open the Dev Menu and choose "Toggle Inspector". It will bring up an overlay that lets you tap on any UI element and see information about it:
131136

132137
![React Native Inspector](/docs/assets/Inspector.gif)
133138

@@ -151,7 +156,7 @@ Then select a React component in React DevTools. There is a search box at the to
151156

152157
## Performance Monitor
153158

154-
You can enable a performance overlay to help you debug performance problems by selecting "Perf Monitor" in the Developer Menu.
159+
You can enable a performance overlay to help you debug performance problems by selecting "Perf Monitor" in the Dev Menu.
155160

156161
<hr style={{marginTop: 25, marginBottom: 25}} />
157162

@@ -187,13 +192,13 @@ You may also access these through `Debug → Open System Log...` in the iOS Simu
187192

188193
> If you're using Create React Native App or Expo CLI, this is configured for you already.
189194
190-
On iOS devices, open the file [`RCTWebSocketExecutor.mm`](https://github.com/facebook/react-native/blob/main/packages/react-native/React/CoreModules/RCTWebSocketExecutor.mm) and change "localhost" to the IP address of your computer, then select "Debug JS Remotely" from the Developer Menu.
195+
On iOS devices, open the file [`RCTWebSocketExecutor.mm`](https://github.com/facebook/react-native/blob/main/packages/react-native/React/CoreModules/RCTWebSocketExecutor.mm) and change "localhost" to the IP address of your computer, then select "Debug JS Remotely" from the Dev Menu.
191196

192197
On Android 5.0+ devices connected via USB, you can use the [`adb` command line tool](http://developer.android.com/tools/help/adb.html) to setup port forwarding from the device to your computer:
193198

194199
`adb reverse tcp:8081 tcp:8081`
195200

196-
Alternatively, select "Dev Settings" from the Developer Menu, then update the "Debug server host for device" setting to match the IP address of your computer.
201+
Alternatively, select "Settings" from the Dev Menu, then update the "Debug server host for device" setting to match the IP address of your computer.
197202

198203
> If you run into any issues, it may be possible that one of your Chrome extensions is interacting in unexpected ways with the debugger. Try disabling all of your extensions and re-enabling them one-by-one until you find the problematic extension.
199204

docs/devsettings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The `DevSettings` module exposes methods for customizing settings for developers
1717
static addMenuItem(title: string, handler: () => any);
1818
```
1919

20-
Add a custom menu item to the developer menu.
20+
Add a custom menu item to the Dev Menu.
2121

2222
**Parameters:**
2323

docs/fast-refresh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: fast-refresh
33
title: Fast Refresh
44
---
55

6-
Fast Refresh is a React Native feature that allows you to get near-instant feedback for changes in your React components. Fast Refresh is enabled by default, and you can toggle "Enable Fast Refresh" in the [React Native developer menu](/docs/debugging#accessing-the-in-app-developer-menu). With Fast Refresh enabled, most edits should be visible within a second or two.
6+
Fast Refresh is a React Native feature that allows you to get near-instant feedback for changes in your React components. Fast Refresh is enabled by default, and you can toggle "Enable Fast Refresh" in the [React Native Dev Menu](/docs/debugging#accessing-the-in-app-developer-menu). With Fast Refresh enabled, most edits should be visible within a second or two.
77

88
## How It Works
99

docs/hermes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ This will compile JavaScript to bytecode during build time which will improve yo
5656
Hermes supports the Chrome debugger by implementing the Chrome inspector protocol. This means Chrome's tools can be used to directly debug JavaScript running on Hermes, on an emulator or on a real, physical, device.
5757

5858
:::info
59-
Note that this is very different with the "Remote JS Debugging" from the In-App Developer Menu documented in the [Debugging](debugging#debugging-using-a-custom-javascript-debugger) section, which actually runs the JS code on Chrome's V8 on your development machine (laptop or desktop).
59+
Note that this is very different with the "Remote JS Debugging" from the In-App Dev Menu documented in the [Debugging](debugging#debugging-using-a-custom-javascript-debugger) section, which actually runs the JS code on Chrome's V8 on your development machine (laptop or desktop).
6060
:::
6161

6262
Chrome connects to Hermes running on device via Metro, so you'll need to know where Metro is listening. Typically this will be on `localhost:8081`, but this is [configurable](https://facebook.github.io/metro/docs/configuration). When running `yarn start` the address is written to stdout on startup.

docs/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This guide is intended to teach you some basics to help you to [troubleshoot per
1111

1212
Your grandparents' generation called movies ["moving pictures"](https://www.youtube.com/watch?v=F1i40rnpOsA) for a reason: realistic motion in video is an illusion created by quickly changing static images at a consistent speed. We refer to each of these images as frames. The number of frames that is displayed each second has a direct impact on how smooth and ultimately life-like a video (or user interface) seems to be. iOS devices display 60 frames per second, which gives you and the UI system about 16.67ms to do all of the work needed to generate the static image (frame) that the user will see on the screen for that interval. If you are unable to do the work necessary to generate that frame within the allotted 16.67ms, then you will "drop a frame" and the UI will appear unresponsive.
1313

14-
Now to confuse the matter a little bit, open up the developer menu in your app and toggle `Show Perf Monitor`. You will notice that there are two different frame rates.
14+
Now to confuse the matter a little bit, open up the [Dev Menu](debugging.md#accessing-the-dev-menu) in your app and toggle `Show Perf Monitor`. You will notice that there are two different frame rates.
1515

1616
![](/docs/assets/PerfUtil.png)
1717

0 commit comments

Comments
 (0)