5.2. Command-Line Options

5.2.1. --debugmsg [channels]

Wine isn't perfect, and many Windows applications still don't run without bugs under Wine (but then, a lot of programs don't run without bugs under native Windows either!). To make it easier for people to track down the causes behind each bug, Wine provides a number of debug channels that you can tap into.

Each debug channel, when activated, will trigger logging messages to be displayed to the console where you invoked wine. From there you can redirect the messages to a file and examine it at your leisure. But be forewarned! Some debug channels can generate incredible volumes of log messages. Among the most prolific offenders are relay which spits out a log message every time a win32 function is called, win which tracks windows message passing, and of course all which is an alias for every single debug channel that exists. For a complex application, your debug logs can easily top 1 MB and higher. A relay trace can often generate more than 10 MB of log messages, depending on how long you run the application. (As described in the Debug section of configuring wine you can modify what the relay trace reports). Logging does slow down Wine quite a bit, so don't use --debugmsg unless you really do want log files.

Within each debug channel, you can further specify a message class, to filter out the different severities of errors. The four message classes are: trace, fixme, warn, err.

To turn on a debug channel, use the form class+channel. To turn it off, use class-channel. To list more than one channel in the same --debugmsg option, separate them with commas. For example, to request warn class messages in the heap debug channel, you could invoke wine like this:

$ wine --debugmsg warn+heap program_name
        

If you leave off the message class, wine will display messages from all four classes for that channel:

$ wine --debugmsg +heap program_name
        

If you wanted to see log messages for everything except the relay channel, you might do something like this:

$ wine --debugmsg +all,-relay program_name
        

Here is a master list of all the debug channels and classes in Wine. More channels will be added to (or subtracted from) later versions.

Table 5-1. Debug Channels

allacceladvapianimateaspi
atomavifile bitblt bitmap caret
cdromclass clipboard clippingcombo
comboex commcommctrlcommdlg console
crtdllcursordatetimedc ddeml
ddraw debug debugstrdelayhlpdialog
dinputdll dosfsdosmemdplay
driverdsoundeditelfdllenhmetafile
eventexecfilefixupfont
gdi globalgraphics headerheap
hookhotkeyicmpiconimagehlp
imagelist immintint10int16
int17int19int21int31 io
ipaddressjoystickkeykeyboardloaddll
ldtlistboxlistviewlocalmci
mcianimmciavimcicdamcimidimciwave
mdimenumessagemetafilemidi
mmauxmmiommsysmmtimemodule
monthcalmprmsacmmsgmsvideo
nativefontnonclientntdllodbcole
openglpagerpalettepidlprint
processprofileprogressproppropsheet
psapipsdrvrasrebarreg
regionrelayresourcericheditscroll
segmentsehselectorsendmsgserver
setupapisetupxshellsnoopsound
staticstatusbarstoragestressstring
syscolorsystemtabtapetapi
tasktextthreadthunktimer
toolbartoolhelptooltipstrackbartreeview
ttydrvtweaktypelibupdownver
virtualvxdwavewinwin16drv
win32winedbgwingwininetwinsock
winspoolwnetx11  

For more details about debug channels, check out the The Wine Developer's Guide.

5.2.2. --dll

Specifies whether to load the builtin or the native (if available) version of a DLL. Example:
$ wine --dll setupx=n foo.exe
          
See the DLL chapter for more details.

5.2.3. --help

Shows a small command line help page.

5.2.4. --version

Shows the Wine version string. Useful to verify your installation.