Search code examples
androidcordovadeveloper-toolscrosswalk

How to reliable get Chrome Devtools working with Cordova+Crosswalk


About once every few months I have to put days and hours in getting Chrome Developer Tools to work again with Cordova/Crosswalk App on real devices.

Please note:

  • I have STFW (too many newbie questions driving out more specific ones)
  • I have RTFM (Cordova docs suck for advanced usage; troubleshooting not really exists)
  • It already worked before.
  • I didnt change anything in Cordova/node/gradle/crosswalk environment (like updates, new plugins, or in general any changes outsite of assets/www)
  • I'm developing with Cordova for almost 2 years now. (so I'm experienced)

What I tried/checked:

  1. USB debugging IS enabled on mobile device
  2. Added in Crosswalk src: XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true)
  3. Set debuggable in Android Manifest: <application android:debuggable="true" ...>
  4. adb devices lists device:

    C:\Users\abcdefg>adb devices
    List of devices attached
    0123456789ABCDEF        device
    
  5. chrome://inspect/#devices lists Chrome Pages on device, but not Cordova-Crosswalk-App (which was running in foreground when screen was shot): chrome://inspect/#devices Screenshot

  6. Tested on two different Android devices (both worked 1 week before):
    • One Plus Two (Android 5.0.0)
    • Custom Chinese Handheld (barcode scanner integrated) (Android 4.2.2)
  7. Tried to start Developer Tools with latest GapDebug (same effect as in Chrome)

I'm running out of ideas.

Is there something else to check? Anyone having similar problems?

EDIT 20.02.2016

I followed @Tasos advice to check for latest phone drivers. I never changed them manually, but after I deinstalled the current driver it worked again like a charm. (no reboot after deinstalling done)

For anyone having similar issues:
Run through my checklist.
If everything seems fine but it's still not working: deinstall phone drivers.
If still no good, reboot.
If still no good, install the latest manufacturer drivers.
If still no good, you probably have another problem.


Solution

  • I followed @Tasos advice to check for latest phone drivers. I never changed them manually, but after I deinstalled the current driver it worked again like a charm. (no reboot after deinstalling done)

    For anyone having similar issues:

    • Run through my checklist.
    • If everything seems fine but it's still not working: deinstall phone drivers.
    • If still no good, reboot.
    • If still no good, install the latest manufacturer drivers.
    • If still no good, you probably have another problem.