docs/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 Network panel allows you to view and inspect the network requests made by your app. Logged requests provide detailed metadata such as timings and headers sent/received, as well as response previews.
Network requests are recorded automatically when DevTools is open. We support most features from Chrome, with some exceptions. See more below.
<details> <summary><strong>💡 Network event coverage, Expo support</strong></summary>Which network events are captured?
Today, we record all network calls through fetch(), XMLHttpRequest, and <Image> — with support for custom networking libraries, such as Expo Fetch, coming later.
Expo Network differences
Because of this, apps using Expo will continue to see the "Expo Network" panel — a separate implementation by the Expo framework which will log these additional request sources but has slightly reduced features.
We're working with Expo to integrate Expo Fetch and third party networking libraries with our new Network inspection pipeline in future releases.
Unimplemented features
At launch, these are the features we don't yet support in React Native:
If you are inspecting a large volume of response data, please note that response previews are cached in an on-device buffer with a maximum size of 100MB. This means we may evict response previews (but not metadata) if the cache becomes too large, oldest request first.
</details>Performance tracing allows you to record a performance session within your app to understand how your JavaScript code is running and what operations took the most time. In React Native, we show JavaScript execution, React Performance tracks, Network events, and custom User Timings, rendered in a single performance timeline.
PerformanceObserver API in your app to observe performance events at runtime — useful if you want to capture performance telemetry.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.