Android remote debugging for Phonegap app does not work

后端 未结 7 1795
借酒劲吻你
借酒劲吻你 2021-02-02 15:08

Hi I am trying to debug my phonegap app on my device via Chrome I have followed all the steps and my phone is recognized by adb devices command,

Then I go to chrome://ins

7条回答
  •  不知归路
    2021-02-02 15:30

    As it is already said in some comments, this is working out of the box since cordova 3.3+ and android 4.4+. You do not need to set anything in the AndroidManifest.xml.

    If you use cordova build or cordova run the default build mode will be "debug". You can see this also in the generated apk file name which will look like:

    {app_name}-debug-unaligned.apk

    In this case you just need Chrome in Version 32+ and select Chrome menu > Tools > Inspect Devices (of course after you deployed the app to your device and turned on usb debugging).

    For additional info look also here: https://developer.chrome.com/devtools/docs/remote-debugging

    Concerning the authentication problem... When you first run cordova android run your app will be deployed to your phone and you need to confirm the authentication dialog and make a tick to remember your choice. After this you should be good to inspect the deployed app in the chrome inspector.

提交回复
热议问题