breautek commented on issue #1577: URL: https://github.com/apache/cordova-android/issues/1577#issuecomment-1488509160
According to the [chromium bug report](https://bugs.chromium.org/p/chromium/issues/detail?id=14224440) you have posted, the folks there claims that this issue does not occur if you use Chrome to debug rather than other software. I'm not certain what difference that makes since I thought both would be remote but I've I was debugging successfully yesterday and my device is running webview 111 currently (Pretty sure it didn't update overnight). The instructions provided in https://www.girish.in/how-remote-debugging-works-in-chrome/ seems to be a convoluted or perhaps old school way to debug the webview. DevTools are packaged with Chrome. To debug via Chrome you'll need to have: - ADB in your `PATH` (found inside `$ANDROID_HOME/platform-tools`) - Chrome for Desktop installed - An USB Data Cable (not to be confused with a charging cable). Some charging cables are actually data cables, but a data cable is guaranteed to have data lanes. Newer devices (Running API 30 or later I believe) also have the option for wireless debugging, but I'm not too familiar with that since my device is running API 29. I've already written a [blog post](https://breautek.com/articles/debugging-cordova-apps.html) on how to debug apps using Chrome, but I'll summarise below. On the desktop, you can go to [chrome://inspect](chrome://inspect), which will bring you to an internal page with debug targets. Your device should appear there. If it doesn't, ensure that ADB sees your device using `adb devices -l`. If ADB lists out empty or doesn't list your device at all, you may need to unplug and replug the USB (ADB is very finicky, and pretty garbage software... a colleague of mine is using the wireless debug feature on his device and it seems much more stable). Once `ADB` sees your device, it should also appear in `chrome://inspect` if you have an app running with a debuggable webview. In cordova, all webviews are debuggable when the app is built using the debug build type (the default as long as the `--release` flag is omitted). From there, there is an `Inspect` button which will open up Chrome DevTools to debug your webview in the cordova application. Lastly if that isn't an option, I don't think Cordova can correct the issue. Applications do not have direct access to webview commandline flags. Comandlines flags are read from a specific file on disk which is only used on specialized debug devices. You can see the [Chromium Docs](https://chromium.googlesource.com/chromium/src/+/HEAD/android_webview/docs/commandline-flags.md) for enabling or changing command line flags, which is quite an involved process. Might be feasible to do on an emulator, but a physical device requires reflashing your OS, unless if you have a specialised developer device. The reason why "consumer" android builds cannot be used is because they have security features turned on that prevents you being able to change these configurations. Let me know if any of this helps. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
