Logs & Debugger
Whether you are a developer or a log-hunting user, debugging is the way to go.
Last updated
Whether you are a developer or a log-hunting user, debugging is the way to go.
Last updated
There are two ways to catch out the logs from Bottles:
using your System Terminal
using the Wine Debugger Console
Let's face them both together.
To capture all Bottles and wineprefixes logs, just start Bottles itself through the Terminal installed on the system, for example through:
GNOME Terminal
Konsole
XFCE4 Terminal
MATE Terminal
xterm
etc.
For example, if you installed Bottles via AppImage:
This way you will receive all the logs in the Terminal (which must remain open).
Using this method you will also see logs from Bottles and not only from runners. The following are the logging levels to better read and understand logs:
[INFO] This log informs the correct functioning of one or more operations performed by Bottles.
[WARNING] It is shown when an operation has been performed but there are one or more non-blocking warnings.
[ERROR] An error occurred and the operation was not completed.
[CRITICAL] The sudden error may have jeopardized Bottles from functioning correctly or an exception was not handled.
Wine comes with a built-in debugger (winedbg
) for analyzing processes running in a wineprefix.
Wine debugger has several useful abilities, including the one to generate backtraces, set breakpoints, and even disassemble code. It supports a subset of the gdb commands, especially the most common ones. For instance you can use info proc and info thread and then attach to a given process, which can be very useful for running backtraces on deadlocks.
From: WineHQ Wiki.
The Wine debugger allows us to access the backtrace of a crashed or frozen process, when this is not normally offered.
First run a Windows executable file in your bottle, then launch winedbg
using the Debug voice in the Utility section from your bottle details.
The system Terminal will run with winedbg
running inside your bottle.
To get the backtrace of all running processes in the wineprefix, type:
To receive the backtrace of a specific process, type:
to list all active processes in the wineprefix.
Focus on the first column of the output where the process ID appears, let's attach the debugger to the process ID of interest:
This will give us the backtrace of the program if already crashed. Otherwise we can get it immediately by typing:
so keep using the program and on crash go back to Terminal to check the backtrace.