Mobile applications |
Different solutions are available to debug a mobile app.
$ export FGLSERVER=device-ip-address $ fglrun -d main.42m
For more details, see Starting fglrun in debug mode.
With app running on a server or on the device, it is possible to show AUI protocol exchanges in the console running the program on the server, by setting the FGLGUIDEBUG envrionment variable to 1. When this variable set, you can watch user interface events that occur during program execution and how they are treated by the runtime system.
To set the FGLGUIDEBUG environment variable for an app running on the device, use an FGLPROFILE fglrun.environment entry. The output can be inspected with the program logs as described later in this section.
For more details, see FGLGUIDEBUG.
$ fglrun --start-guilog=case1.logThe AUI protocol log file produced by the --start-guilog option can then be shared for analysis.
For more details, see Front-end protocol logging.
When executing the mobile app on a device, and if the app has been created with debug mode, it is possible to establish a connection to the runtime system executing on the mobile device, by using the fgldb command line tool.
For example:
$ fgldb -m 192.168.1.23:6400 108 DISPLAY ARRAY contlist TO sr.* (fgldb)
This way you can debug an app running on a device, by using the source code located on the server where the fgldb command is executed.
For more details, see Debugging on a mobile device.
The gmabuildtool provides the --mode debug option, to create a debug version of the APK.
For more details, see Building Android apps with Genero.
For more details, see Building iOS apps with Genero.
The content of the Abstract User Interface tree created on the mobile front-end side can be inspected from a web browser, when the app has been created with debug mode, or in development mode by executing the app on a server and displaying on the device.
http://device-ip-address:6480 (or 6400)
For more details, see Inspecting the AUI tree of a front end.
The program logs of an app running on a device can be viewed in a browser, if the app was created in debug mode. VM messages (runtime errors, standard output and standard error) are available. This feature is not availbale if the app is build in release mode.
http://device-ip-address:6480 (or 6400)
A menu will then appear in the web page, where you can choose the VM output to be inspected.