Debugging Flow Activities

You can use a JavaScript debugger to debug the activity running on your Android device. Debugging on iOS is currently not possible due to platform limitations.

Using console.log statements in your code will print directly to the Flow Desktop App or the command line (depending on which tool you use to run your development server). By following the steps described below, you can also access the Chrome Inspector associated with the web view that the activity runs in, which gives you access to the Console with it's more advanced logging capabilities.

Debugging Android with the Chrome Inspector

  • Install and run Google Chrome or the Chromium browser on your computer
  • Connect your Android device via a suitable cable to your computer
  • Enable USB debugging in the Developer Options (if you can't find this option in the settings, you need to enable it first, the way to do this varies by device and OS version)
  • Open the local activity that is provided by the Flow Desktop App or sflow
  • Open chrome://inspect in the browser on your computer
  • Choose "inspect" next to your device in the browser, this shows the Developer Tools connected to the web view that the activity runs in. You might be asked if you trust the computer trying to connect to your device, choose "Yes" if prompted.
  • You can now see your code in the Sources tab and use the normal debugging workflow. Try to type in Scandit.Device.getInfo() in the console to see some details about your device that the Flow Mobile API provides.

To learn more about the Chrome Developer Tools, go to the Chrome DevTools Overview provided by Chrome.