microsoft / microsoft/react-native-windows

[0.85] React Native DevTools "Performance" panel: recording a trace then Stop disconnects the app

Open
#16,354 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Invalid Triage Needs: Triage :mag:
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Summary

In the Modern debugger (React Native DevTools / fusebox), opening the Performance panel, recording a trace, and pressing Stop reproducibly disconnects the debugging session — the app drops off with "DevTools is disconnected — Connection lost to corresponding device." The app has to be relaunched to reconnect.

Environment

  • react-native-windows: 0.85.0-preview.1
  • react-native: 0.85.3
  • @react-native/dev-middleware: 0.85.3
  • @react-native/debugger-frontend: 0.85.3
  • JS engine: Hermes
  • OS: Windows 11 (10.0.26200)
  • Repro app: NativeModuleSample (cpp-lib) example

System: OS: Windows 11 10.0.26200 CPU: (16) x64 Intel(R) Core(TM) i9-9900 CPU @ 3.10GHz Memory: 35.15 GB / 63.84 GB
Binaries: Node: 22.22.0 npm: 10.9.4
SDKs: Windows SDK Versions: 10.0.22621.0, 10.0.26100.0
IDEs: Visual Studio: 18.7.12002.237 (Visual Studio Enterprise 2026)
npmPackages: react: 19.2.3 react-native: 0.85.3 react-native-windows: 0.85.0-preview.1 @react-native-community/cli: 20.2.0

Steps to reproduce

  1. Launch an RNW 0.85 Hermes app and connect Metro.
  2. Press j in Metro to open React Native DevTools.
  3. Open the Performance tab.
  4. Click Record, interact with the app for a couple of seconds.
  5. Click Stop.

Expected

A performance timeline / trace renders in the panel.

Actual

The app immediately disconnects: "DevTools is disconnected. Debugging connection was closed. Reason: Connection lost to corresponding device." The trace is lost and the app must be relaunched. Reproduced 2/2 times. A headless CDP probe showed the classic Profiler.stop / trace-stop path also hangs, consistent with this.

Other panels (context — all validated on RNW 0.85)

  • Console ✅ • Sources/Breakpoints ✅ (breakpoint actually hits & pauses) • Memory ✅ (heap snapshot) • Components ✅ • Profiler ✅
  • Network ⚠️ — panel loads and records, but no requests appear. This is a separate, pre-existing platform gap (RNW's WinRT networking is not wired to the inspector's Network domain / NetworkReporter); it is not specific to 0.85. Documenting as a known limitation.

Root-cause notes (not an RNW-0.85 regression)

  • The debugger stack is stock upstream RN 0.85.3 (dev-middleware, debugger-frontend, react-devtools-core unmodified by RNW).
  • Diffing 0.84-stable0.85-stable, RNW's own inspector/Hermes/DevSupport native code has zero changes (HermesRuntimeAgentDelegate, HermesRuntimeTargetDelegate, ReactInspectorPackagerConnectionDelegate, DevSupportManager).
  • RNW has no CDP Tracing code of its own; the Performance/trace path is handled entirely by upstream Hermes + jsinspector-modern.
  • Therefore this is upstream Hermes/DevTools behavior surfacing on Windows, not a change introduced by the 0.85 integration. Filed here for tracking / upstream escalation.

Severity

Low-Medium — user-facing (one of seven debugger panels is unusable via record→stop), but does not affect app runtime; only the debugging session drops. Workaround: relaunch the app; use the React Profiler panel for render timing instead.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure in the NativeModuleSample (cpp-lib) app with the React Native DevTools Performance panel. Trace the CDP Profiler.stop/trace-stop path through upstream Hermes and jsinspector-modern, using the headless CDP probe context from the report. Done means stopping a recording renders the performance trace without disconnecting the app or losing the debugging session.

Written by the indexing model from the issue text.

Assessment

Tech stack
devtools, javascript, react-native
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.