WhoBuilt

The New React Native Debugger

Oct 4, 2024· 29 min· 6.9K views·Watch on YouTube

Speaker

Alex Hunt, a software engineer on Meta’s React team, presents the new React Native debugger at React Universe Conf 2024, hosted by Callstack.

Why debugging needed a reset

React Native debugging had become fragmented and unreliable as the platform evolved. Earlier approaches included Safari debugging, remote JavaScript execution in V8, direct Hermes debugging, and Flipper, each with limitations or maintenance issues. Hunt says the team concluded that adding features to the existing stack would not solve its fundamental reliability problems.

A new debugger built around CDP

The team chose the Chrome DevTools Protocol to provide a familiar, cohesive way to debug React Native apps. Hunt describes principles of familiarity, a single entry point, and keeping React Native’s tools focused alongside native tools such as Xcode and Android Studio. The resulting React Native DevTools is based on Chrome DevTools and includes React DevTools.

Rebuilding the connection to the app

The previous debugger relied on Hermes and development server workarounds to keep sessions alive across app reloads, which could lose state and break connections. The new C++ debugger server is part of React Native’s core infrastructure and sits upstream from Hermes. Hermes connects as a runtime agent, while the architecture can support other agents for features beyond JavaScript.

Breakpoints and React inspection that persist

Hunt demonstrates breakpoints that previously disappeared or stopped firing after reloads, and a paused app state that gave unclear feedback. The new debugger preserves breakpoints across reloads and reconnects, shows a paused-in-debugger overlay, and offers a reconnect flow using a stable device identifier. React DevTools now shares the CDP connection, allowing developers to inspect multiple devices side by side.

Availability and planned extensions

React Native DevTools was announced as stable and enabled by default in React Native 0.76, supporting Hermes on both the old and new architectures. Hunt identifies the Performance panel as the next feature target, followed by a Network inspector, and says third-party Chrome extensions and improved VS Code support are being explored. He encourages developers to try the debugger and share feedback through the project’s Discussions and Proposals repository.

Takeaways

  • Keep debugger sessions owned by infrastructure that survives app reloads, so breakpoints and state do not depend on a replaceable runtime.
  • Choose one communication protocol and entry point to reduce fragmentation across debugging tools.
  • Make debugger reliability a release requirement: verify breakpoints, logs, and reconnect behavior across reloads and device restarts.
  • Integrate framework-specific inspection with JavaScript debugging so developers can move between component and source views in one session.
  • Treat future debugging features as explicit targets or experiments; the talk gives no dates for the Performance panel, Network inspector, extensions, or VS Code support.

Mentioned in this talk

Search inside this talk

What was claimed 14

Show all 14 facts

Related talks