website/versioned_docs/version-0.78/react-native-devtools.md
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
React Native DevTools is our modern debugging experience for React Native. Purpose-built from the ground up, it aims to be fundamentally more integrated, correct, and reliable than previous debugging methods.
React Native DevTools is designed for debugging React app concerns, and not to replace native tools. If you want to inspect React Native’s underlying platform layers (for example, while developing a Native Module), please use the debugging tools available in Android Studio and Xcode (see Debugging Native Code).
<details> <summary>**💡 Compatibility** — released in 0.76</summary>React Native DevTools supports all React Native apps running Hermes. It replaces the previous Flipper, Experimental Debugger, and Hermes debugger (Chrome) frontends.
It is not possible to set up React Native DevTools with any older versions of React Native.
chrome://inspect is no longer supported. Features may not work correctly, as the latest versions of Chrome DevTools (which are built to match the latest browser capabilities and APIs) have not been tested, and this frontend lacks our customisations. Instead, we ship a supported version with React Native DevTools.We want the tooling you use to debug React across all platforms to be reliable, familiar, simple, and cohesive. All the features described on this page are built with these principles in mind, and we also want to offer more capabilities in future.
We are actively iterating on the future of React Native DevTools, and have created a centralized GitHub discussion to keep track of issues, frequently asked questions, and feedback.
</details>React Native DevTools is based on the Chrome DevTools frontend. If you have a web development background, its features should be familiar. As a starting point, we recommend browsing the Chrome DevTools docs which contain full guides as well as video resources.
The Console panel allows you to view and filter messages, evaluate JavaScript, inspect object properties, and more.
Console features reference | Chrome DevTools
The Sources panel allows you to view the source files in your app and register breakpoints. Use a breakpoint to define a line of code where your app should pause — allowing you to inspect the live state of the program and incrementally step through code.
Pause your code with breakpoints | Chrome DevTools
:::tip
Breakpoints are a fundamental tool in your debugging toolkit!
:::
debugger; statement to quickly set a breakpoint from your text editor. This will reach the device immediately via Fast Refresh.The Memory panel allows you to take a heap snapshot and view the memory usage of your JavaScript code over time.
Record heap snapshots | Chrome DevTools
In the integrated Components and Profiler panels, you'll find all the features of the React DevTools browser extension. These work seamlessly in React Native DevTools.
The React Components panel allows you to inspect and update the rendered React component tree.
:::tip
Re-renders can be a significant contributor to performance issues in React apps. DevTools can highlight component re-renders as they happen.
⚙︎) icon and check "Highlight updates when components render".:::
The React Profiler panel allows you to record performance profiles to understand the timing of component renders and React commits.
For more info, see the original 2018 guide (note that parts of this may be outdated).
Occasionally, DevTools might disconnect from the target device. This can happen if:
On disconnect, a dialog will be shown with the message "Debugging connection was closed".
From here, you can either:
×) icon or click outside the dialog to return to the DevTools UI in the last state before disconnection.