microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.3k stars 1.14k forks source link

RNW instances using Hermes should support direct debugging in release builds #10245

Open aeulitz opened 2 years ago

aeulitz commented 2 years ago

Summary

Today, Hermes integration in RNW uses build-time switches to exclude direct debugging features in RNW release builds. Direct debugging should work in both debug and release builds.

Motivation

Assuming RNW releases are build-flavor-paired with RNW host apps (e.g. Word, Excel), the current limitation prohibits direct debugging in release versions of RNW host apps and thus diminishes the dev experience which could be particularly relevant for service-delivered (out-of-box) packages.

Basic Example

No response

Open Questions

Direct debugging requires inclusion of Hermes inspector components which are bound to increase the size of the binary. We should measure the size increase and decide whether that's an acceptable perf hit.

chrisglein commented 2 years ago

Having release builds avoid the debugging cost is a defensible position. Apps can opt into this with a compile-time switch, correct. Is the proposal to change the default? Or to better document this so apps know what they are choosing?