Official Content

This document gives the first approach for debugging Native Mobile applications by inspecting log messages.

Step 1 - Enable Log level

The first thing you must do is to set the Enable Logging property in True (default value), and then indicate the log level to record for each feature.

This action can be made by setting the following properties at the Native Mobile Main object's level:

Step 2 - Run the application

You must build and run your Native Mobile application (Main Object).

Step 3 - Inspect log messages

Android environment

There are two ways to debug Android applications, all of them by using the LogCat tool.

1) By using Android Studio
If you are using Android Studio, you can run Android LogCat by navigating from View > Tool Windows > Logcat .

ASLogCat_2022517151019_1_png

Apple environment

There are three ways to check the generated logs in Apple applications.

1) By using XCode Debug Console
The developer should open XCode and run the application from it. Then, log messages will be displayed on the debug Console.
Logging - XCode - Debug Console

2) By inspecting application log files
The application will generate *.log files in its data path (accessible from Directory.ApplicationDataPath). Then, you can read it from the application and send a report, or simply display its contents on it. The following example displays log files and their contents directly on the application (download it here, and include it in your KB).
Logging - iOS - Read from log file

3) By using logfile from simulator
Once the application is launched in a simulator (e.g. by F5 from GeneXus), the developer can inspect the log by doing Debug > Open System Log... from the system bar (or ⌘+/ shortcut).

Notes

  • With Apple applications, instead of setting logging properties with GeneXus, you can enable logging by going to Settings > <your_app> and turn on Enable Log switch (and which log level desires).
    Logging - iOS - Application Settings

Scope

Generators: Apple, Android

See Also

Download UILogging module
Apple Developer - Debugging Tools
Android Developer - Write and View Logs with Logcat

Last update: June 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant