docs/inspector.md
React Native for Windows with Hermes engine now supports direct JavaScript runtime inspection using tools such as Chrome or Edge devtools, VSCode debugger, Flipper etc. by implementing an in-process Chrome Debug Protocol server. Please note that it is fundamentally different from "Remote JS Debugging", which loads the JavaScript bundle into a remote Chrome browser session with duplex communication over IPC channels.
We share the implementation (code and design) with other platforms wherever possible. All the external endpoints, APIs and protocols should be identical to React Native environments on other platforms. Hence, we expect most tooling available on other platforms to just work on Windows. But, as of now, we have tested only with Chrome and Edge devtools.
DeveloperSupportFastRefreshDirect DebuggingAfter the app has booted,
edge://inspect in Edge browser or chrome://inspect in Chrome browserlocalhost:8081 (or wherever the metro server is running)Ctrl+P to open source files and set break pointsdebugger statements in source code to break on specific locationsIn order to break on locations during boot, you can either
debugger statements during boot sequence will pause the runtime waiting for debugger to connectFollow steps 1-7 from above, and then
We keep the inspector turned off on release builds by default. If you want to debug or profile release builds, set the MSBuild property EnableHermesInspectorInReleaseFlavor to 'true' when building the platform.