Debug Android Emulator in VS Code


#1

Hi,

Has anyone got debugging working from VS Code in the Android Emulator (or Device)?

I can’t get a working config going. Some kind of source map issue. From all the web research I can’t find if it is actually even supported or no by the vscode-cordova plugin?

Debugging works fine in Chrome - remote debugging the android device. It’s just a bit of a pain connecting it all up and adding the source map to Chrome, etc. Would be nice to just click a button :stuck_out_tongue:

Anyway, this is my launch.json

{
    "version": "0.2.0",
    "configurations": [        
        {
            "name": "Run Android on emulator",
            "type": "cordova",
            "request": "launch",
            "platform": "android",
            "target": "emulator",
            "sourceMaps": true,
            "cwd": "${workspaceRoot}/www/build",
            "ionicLiveReload": true,
            "appStepLaunchTimeout": 120000,
            "devServerTimeout": 120000
        }
    ]
}

Anyone got a working config using the base starter project?