Closed alexwolf22 closed 8 months ago
Hi @alexwolf22, thanks for reaching us. Could you please try to use below config for debugging?
{
"name": "Attach to Hermes application",
"request": "attach",
"type": "reactnativedirect",
"cwd": "${workspaceFolder}"
}
@lexie011 that did the trick thank you!
I spent way too much time today trying to get the debugger working lol
I've also tried it. It looks like it attaches, but the breakpoints are unbound.
I've also tried it. It looks like it attaches, but the breakpoints are unbound.
+1
🐛 What is the bug? How can we reproduce it?
Hi I am trying to use the VS code debugger with my react native expo app, but it's not stopping on breakpoints in VS code.
I have a development build installed on my local simulator, with the local server is using the expo dev client started with
npx expo start --dev-client
on my mac.I am able to stop on breakpoints using the built in JS Debugger in the simulator. ( see photo below 1), but when I set the same exact breakpoint in VS code it's not stopping ( Photo 2)
I'm unsure what exactly causing the breakpoint not be working in VS code. The progress bar in the top left doesn't seem to be moving at all.
Photo 1
Photo 2
Here is my
launch.json
fileExpected behavior
What were you expecting to happen?
VS code stops on breakpoints when it hits that line of code in the GUI.
Debug output
Debug Console
```text From client: initialize({"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"reactnative","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true}) To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"supportsConfigurationDoneRequest":true,"supportsEvaluateForHovers":true,"supportTerminateDebuggee":true,"supportsCancelRequest":true}} From client: attach({"name":"Debug React Native App","request":"attach","type":"reactnative","cwd":"/Users/alexwolf/Code/scratch_odds/scratch-odds-react-app","sourceMaps":true,"trace":"verbose","__configurationTarget":6,"__sessionId":"f1cb99c5-9bfc-49a2-9e0f-6bd33ee94b2c"}) Attaching to the application Attaching to the application: { "name": "Debug React Native App", "request": "attach", "type": "reactnative", "cwd": "/Users/alexwolf/Code/scratch_odds/scratch-odds-react-app", "sourceMaps": true, "trace": "verbose", "__configurationTarget": 6, "__sessionId": "f1cb99c5-9bfc-49a2-9e0f-6bd33ee94b2c", "enableDebug": true, "sourceMapRenames": false } Starting debugger app worker. About to download: http://localhost:8081/debugger-ui/debuggerWorker.js to: /Users/alexwolf/Code/scratch_odds/scratch-odds-react-app/.vscode/.react/debuggerWorker.js ```React Native output channel
```text .... ```Developer Tools console
```text PASTE OUTPUT OF DEVELOPER TOOLS CONSOLE (Help -> Toggle Developer Tools -> Select Console tab) ```Environment
Please tell us about your system and your project:
npx react-native doctor
ornpx expo doctor
if your project is using Expo:envinfo
: