To view console output (javascript) for a webview application (for example, Phonegap), do one of the following:
Safari (iOS): On your device, turn off private browsing and turn on the web inspector. In Safari, enable development tools, and you should see the device in the Developer menu. Select it and use Cmd + R to update and get results when the application starts.
Chrome (Android): Go to chrome: // check / # devices and open webview. Use ctrl + R to update and view the results when the application starts. Also, make sure debugging is enabled on your Android device.
source share