Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18066] Support remote debugging / inspecting of Android webviews

GitHub Issuen/a
TypeImprovement
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-04-07T21:00:21.000+0000
Affected Version/sRelease 5.2.0
Fix Version/sRelease 5.3.0
ComponentsAndroid
Labelsandroid, debugging, webview
ReporterTiman Rebel
AssigneeHans Knöchel
Created2014-11-18T13:20:34.000+0000
Updated2016-05-18T23:00:55.000+0000

Description

Android supports the ability to inspect and debug webviews, just like iOS. On Android you have to enable it however by setting setWebContentsDebuggingEnabled to true. http://developer.android.com/reference/android/webkit/WebView.html#setWebContentsDebuggingEnabled(boolean)

Attachments

FileDateSize
crash.rtf2016-04-24T08:44:43.000+00005129

Comments

  1. Timan Rebel 2014-11-20

    PR on Master: https://github.com/appcelerator/titanium_mobile/pull/6365
  2. Jason Priebe 2014-12-19

    Please add support for this option -- using the inspector is invaluable in debugging apps that make heavy use of webviews!
  3. Blackbaud Mobile 2015-01-30

    We use a web view for portions of our app and would love to see this feature added! Thank You.
  4. Hans Knöchel 2016-04-06

    Updated PR with corrected indentation: PR (master): https://github.com/appcelerator/titanium_mobile/pull/7920 PR (5_3_X): https://github.com/appcelerator/titanium_mobile/pull/7922
  5. Chee Kiat Ng 2016-04-08

    PRs merged
  6. Lokesh Choudhary 2016-05-18

    Verified the fix. For remote debugging/inspecting android webviews the debuggable flag should se to true in the tiapp.xml:
       <android xmlns:android="http://schemas.android.com/apk/res/android">
           <manifest>
               <application android:debuggable="true" />
           </manifest>
       </android>
       
    Webviews can be remote debugged/inspected successfully using chrome. Closing. Environment: Appc Studio : 4.6.0.201605180604 Ti SDK : 5.3.0.v20160517124218 Ti CLI : 5.0.8 Alloy : 1.8.7 MAC El Capitan : 10.11.4 Appc NPM : 4.2.5-5 Appc CLI : 5.3.0-45 Node: 4.2.2 Nexus 6 - Android 6.0.0 Nexus 5 - Android 5.1.1 Android Emulator - Android 6.0.0

JSON Source