Skip to content

How to get your device logs

lmarceau edited this page Feb 10, 2023 · 20 revisions

Device logs

There's different type of logs we can get from our application. If you encounter a crash, you can get your hands on crash reports which are useful to get the backtrace to the said crash. This is normally the most useful way to debug a crash. If you have no crashes and experience another type of issue (for example a performance issue) it would be useful to get the Firefox logs which are more generic. Firefox logs can help pinpoint certain issues although without certainty. So if you have a crash you can send both type of logs if you want, but if you have no crash the Firefox logs are the best we can get.

Crash logs

There's two ways of getting crash logs. The first one you only need your phone and the second you need Xcode.

Get crash logs from iOS settings analytics

  • Open the iOS Settings
  • Navigate to Privacy & Security > Analytics & Improvements > Analytics Data
Privacy & Security Analytics & Improvements Analytics Data
  • Use the search function and tap in the name (i.e. in our case it's Client). You might have to scroll up to be able to see the search bar.
Search Result
  • Select the desired log which in the screenshot is of format Client-2022-15-XXXXXX.ips
  • You can share by clicking the share button at the top of the opened log
Crash log Sharing

Get crash logs from Xcode

  • Have your physical phone connected to Xcode.
  • Open the devices and simulator window under XCode menu Window -> Devices and Simulator.
  • Select your device in the side bar list.
  • Click on View Device Logs.
  • Sort by processes to find Firefox related logs.

Firefox logs

There's two ways of getting Firefox logs. The first one you only need your phone and the second you need Xcode.

Access Firefox logs via Files App on iOS Device

  • Launch Firefox on a real device.
  • Open Settings.
  • Scroll down to Version and tap it several times.
  • Scroll down and hit Debug: copy log files to app container. This triggers the logs to be saved into the Documents folder.
  • Open the Files App on your iOS device and navigate to Browse > On my iPhone > Fennec > Logs. You can see the different logs files here, which you can export using the share menu from Apple.

Access Firefox logs via XCode container method

  • Launch Firefox on a real device.
  • Open Settings.
  • Scroll down to Version and tap it several times.
  • Scroll down and hit Debug: copy log files to app container. This triggers the logs to be saved into the Documents folder.
  • Connect your device via USB.
  • Open Xcode.
  • Window > Devices. Choose your device.
  • Find Firefox on the right side.
  • Click the three dots icon, and choose "Download Container…". Save it somewhere you can find later. This saves a .xcappdata file. Screen Shot 2022-10-24 at 1 57 31 PM
  • Locate the .xcappdata file you just saved and right-click on it to "Show Package Contents".
  • Navigate to AppData/Documents/Logs, you have all the devices logs there.

Firefox logs format

On application version equal or higher than 111, logs are into one file only called Firefox.log. Each new application session will be saved inside the same file.

On application version lower than 111, logs were separated in three categories:

  • Sync to record what's happening with Sync, Accounts, Providers, Storage, and Profiles called Sync.log
  • Browser to record what's happening in the front-end and the browser Browser.log
  • Keychain to record interactions with the keychain Keychain.log Each session created a new file.
Clone this wiki locally