In an Android WebView, it is now pretty easy to allow debugging in Chrome on an attached computer. Just add this code and you can debug a WebView just like a page you have open in Chrome:
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
}
Works great. Wonderful. I'm using it in a Cordova app I'm working on.
My question is, can this cause any problems? Is there any reason I shouldn't leave debugging enabled if I release my app publicly? I presume there must be, otherwise it would just be enabled by default and any WebView would be debuggable. But I don't know why.