How I normally debug in chrome
When I debug my web app in VSCode I can create a configuration in launch.json and run this in the debugger in order attach the debugger to an instance of Chrome.
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
}
This allows me to make breakpoints within VSCode instead of in DevTool. It's easier to navigate my React files in VSCode, than in DevTools.
How I'm debugging on the Android Studio emulator's chrome
To inspect my web app on the emulated Android, I open my web app in the emulated Android's Chrome browser. Then I go to my desktop Chrome browser and navigate to chrome://inspect/#devices and click 'inspect' on the emulated device. Then I can set breakpoints in Chrome DevTools.
Can I debug the emulated Android within vscode?
Is it possible to attach this Android emulator's Chrome to the VSCode debugger like I normally do with Chrome? I would rather debug within VSCode, than through DevTools.