docs/user-guide/troubleshooting/collecting-debug-logs.md
Thunderbird for Android can produce debug logs to help diagnose problems and errors. This guide explains how to enable logging, reproduce the issue, collect logs, and share them with the team.
If Thunderbird crashes before you can reach Settings, jump directly to Method B: Using a PC with ADB.
Perform the actions that lead to the error or crash. This ensures the relevant events are captured in the log.
Take note of:
This information makes it easier to match the log entries to the problem when reviewing your report.
Choose one of the following methods:
Use this if the app is not crashing during startup.
Use this if the app crashes on startup or you prefer collecting logs via a computer.
Requirements:
Steps:
Connect your device to the computer and verify ADB sees it:
adb devices
You should see your device listed. If not, ensure drivers are installed (Windows) and USB debugging is enabled.
Find Thunderbird’s process ID (PID):
On Linux / macOS:
adb shell ps | grep net.thunderbird.android
# For K-9 Mail:
adb shell ps | grep com.fsck.k9
On Windows (Command Prompt):
adb shell ps -A | findstr net.thunderbird.android
# For K-9 Mail:
adb shell ps -A | findstr com.fsck.k9
Example output:
u0_a153 5191 587 4468612 112380 SyS_epoll_wait 0 S net.thunderbird.android
In this example, the PID is 5191.
Capture the debug log to a file:
adb logcat -d --pid=<PID> > thunderbird-log.txt
Replace <PID> (including brackets) with the actual number.
> was unexpected at this time., it usually means you forgot to replace <PID> with
the actual number.
To capture ongoing logs while reproducing the issue:adb logcat --pid=<PID> > thunderbird-log.txt
Stop the command with Ctrl+C (Windows/Linux) or Command+C (macOS).
Tips:
pgrep is unavailable, see Troubleshooting ADBDebug logs may include details about your account or device. While most of this is safe to share, here are some things you may want to remove before attaching logs:
AUTH, LOGIN, or PASSWORD. Replace with password with redacted-password.redacted-pii.redacted-mail-server.oauth= or token=. Replace with redacted-oauth-token.On Windows: Open the file in Notepad or another text editor and use Ctrl+F to search.
On macOS/Linux: Use grep in the terminal. For example, to find passwords:
grep -iE 'auth|login|password' thunderbird-log.txt
If adb devices shows unauthorized, accept the RSA key prompt on your device. If it doesn’t appear:
adb kill-server
adb start-server
On Windows, install OEM USB drivers if your device isn’t detected.