Unable to debug RNW app (Hermes Direct Debugging) with Visual Studio 2022 (17.9.3) if the native solution is open #12842
Labels
Area: Debug Infrastructure
Area: Developer Experience
bug
Developer First Experience
Issues that are going to be hit by a new developer as they first try out RNW
Scenario: Visual Studio
Milestone
Problem Description
If you have an RNW app and you open the
.sln
file (loading the nativevcxproj
app project in Visual Studio 2022) then you'll get an error when trying to debug the JS by attaching to Metro athttp://localhost:8081
as recommended by the debugging docs:Trying to attach:
The error:
Added logging after calling
DebugAdapterHost.Logging /On /OutputWindow
in the Command Window:This repros with a RNW 0.73 app using Hermes and direct debugging with Visual Studio 17.9.3. Extracted from #12113.
Steps To Reproduce
Create and build new app with Hermes and Direct Debugging enabled
npx react-native@latest init test73
cd test73
npx react-native-windows-init --overwrite
UseWebDebugger
tofalse
andUseDirectDebugger
totrue
inwindows\test73\App.cpp
npx react-native run-windows --logging
Try to attach Visual Studio debugger
windows\test73.sln
Debug
>Attach to Process
a. Connection type: JavaScript and TypeScript (Chrome DevTools/V8 Inspector)
b. Connection target: https://127.0.0.1:8081
c. Attach to: JavaScript and TypeScript
Expected Results
Debugger attaches, loads the source map from Metro, and lets me debug the JS code.
CLI version
12.3.6
Environment
Target Platform Version
None
Target Device(s)
Desktop
Visual Studio Version
Visual Studio 2022
Build Configuration
Debug
Snack, code example, screenshot, or link to a repository
No response
The text was updated successfully, but these errors were encountered: