-
Notifications
You must be signed in to change notification settings - Fork 1.2k
VS Code Direct Debugging
"Direct Debugging" allows you to debug JS while it's running directly in the client (as opposed to in the web debugger).
To set this up, you need to make a few code changes in your native code to configure direct debugging:
-In the app code that creates and sets DevSettings, you'll need to turn these settings on:
devSettings->useDirectDebugger = true;
devSettings->debuggerBreakOnNextLine = true;
devSettings->debuggerPort = 9229;
-Also make sure devSettings->useWebDebugger is set to false
-In VS Code add a configuration like this:
{
"type": "node",
"request": "attach",
"name": "Attach to ReactTest direct debugger",
"protocol": "inspector",
"port": 9229
}
Launch your app
In VS Code, from the Debug menu, hit the play button with "Attach to ReactTest direct debugger" selected