Remote Debugging

Remote Debugging a WebView from chrome://inspect

With the device connected over adb, open chrome://inspect/#devices in desktop Chrome 1 . Each inspectable WebView appears with its URL, and inspect opens full DevTools on it. This is where console.log output goes (deviceready), and the console snippets of Cordova Plugins used the same protocol.

Under the hood, every debuggable WebView listens on an abstract Unix socket named after its process ID, and adb forwards a local port to it:

Finding BookNest's DevTools socket and asking it what it servesShell
adb -s emulator-5558 shell cat /proc/net/unix | grep devtools_remote
pid=$(adb -s emulator-5558 shell pidof com.example.booknest)
adb -s emulator-5558 forward tcp:9222 localabstract:webview_devtools_remote_$pid
curl -s http://localhost:9222/json/list | grep -E '"(title|url)"'
Output
0000000000000000: 00000002 00000000 00010000 0001 01 22576 @webview_devtools_remote_2653
9222
   "title": "BookNest",
   "url": "https://localhost/index.html",

cordova-android 15 makes the WebView inspectable only when the APK is debuggable, which debug builds are and release builds are not. The InspectableWebview preference in config.xml overrides that in either direction; never set it to true for a release, or anyone with a cable can read and change your app's data from DevTools.