Debug Channels

From WineHQ Wiki
Revision as of 11:21, 23 January 2016 by RosanneDiMesio (Talk | contribs) (Note to translators)

Jump to: navigation, search





class is optional and can be one of the following: err, warn, fixme, or trace. If class is not specified, all debugging messages for the specified channel are turned on. Each channel will print messages about a particular component of Wine. The following character can be either + or - to switch the specified channel on or off respectively. If there is no class part before it, a leading + can be omitted. Note that __spaces are not allowed any where in the string__.






will turn on all warning messages.
will turn on DLL warning messages and all heap messages.
will turn off all FIXME messages, turn on cursor warning messages, and turn on all relay messages (API calls).

List of Debug Channels

accel acledit actctx activeds actxprxy adpcm advapi advpack alsa amstream
animate appbar appwizcpl aspi atl atom avicap avifile bidi bitblt
bitmap browseui button cabinet capi cards caret cdrom class clipboard
clipping clusapi cmd cmdlgtst combo comboex comm commctrl commdlg compstui
computername console coreaudio cred credui crtdll crypt cryptasn cryptdlg cryptdll
cryptnet cryptui ctapi32 curses cursor d3d d3d10 d3d11 d3d7 d3d8
d3d9 d3d_caps d3d_constants d3d_decl d3d_draw d3drm d3d_shader d3d_surface d3d_texture d3dx
d3dx8 d3dxof datetime dbghelp dbghelp_coff dbghelp_dwarf dbghelp_msc dbghelp_stabs dbghelp_symt dc
dciman ddeml ddraw ddraw_thunk debug_buffer debugstr devenum dialog dinput dll
dma dmband dmcompos dmdump dmfile dmfileraw dmime dmloader dmscript dmstyle
dmsynth dmusic dmusic32 dnsapi dosmem dpa dplay dpnet dpnhpast dpvoice
driver ds dsa dsalsa dscapture dsound dsound3d dssenh dswave dwmapi
dxdiag edit eject enhmetafile environ event eventlog exec explorer faultrep
fiber file fixup font fps fusion g711 gdi gdiplus global
glu gpkcsp graphics handle header heap hid hlink hnetcfg hook
hotkey htmlhelp iccvid icm icmp icon imagehlp imagelist imm imports
inetcomm inetmib1 infosoft initpki inkobj inseng int int21 int31 io
ipaddress iphlpapi itircl itss jack joystick jscript key keyboard listbox
listview loaddll local localspl localui lsa mapi mci mciavi mcicda
mcimidi mciwave mdi menu menubuilder message metafile midi mixer mlang
mmaux mmio mmsys mmtime module monthcal mountmgr mpeg3 mpr mprapi
msacm mscat mscms mscoree msdmo msftedit msg msgbox mshtml msi
msidb msiexec msimg32 msimtf msisip msisys msnet msrle32 mssip32 mstask
msvcirt msvcr71 msvcrt msvcrt40 msvidc32 msvideo mswsock msxml nativefont nddeapi
netapi32 netbios newdev nls nonclient ntdll ntdsapi ntlm ntoskrnl ntprint
objsel odbc ole oleacc oledlg olemalloc olerelay olethk32 oleview opengl
openal32 pager palette pdh pidl powermgnt powrprof print printui process
profile progress propsheet propsys psapi psdrv pstores qcap qcap_v4l qedit
qmgr quartz query ras rebar recyclebin reg regedit region relay
resource resutils richedit richedit_check richedit_lists richedit_style rpc rpcss rundll32 sblaster
sccbase schannel scroll secur32 seh selector sensapi server service setupapi
sfc share shdocvw shell shlctrl slbcsp slc snmpapi snoop sound
spoolss spoolsv start static statusbar storage stress string svchost svrapi
sxs sync synchronous syslevel system systray tab tape tapi task
text theming themingcombo thread threadpool thunk tid time timestamp toolbar
toolhelp tooltips trackbar trash treeview twain typelib typelib2 uninstaller uniscribe
updown url urlmon user userenv uxtheme variant vdmdbg ver virtual
volume vxd wave wavemap wc_font wgl win wineboot winebrowser winecfg
wineconsole wine_d3d winedbg winedevice winemine winevdm wing winhelp winhttp wininet
winmm winscard winsock winspool winstation wintab wintab32 wintrust wldap32 wnet
wtsapi x11drv x11settings xcopy xdg xdnd xrandr xrender xvidmode

Useful Channels

Some of the debug channels can be particularly useful:

  • +loaddll : reports each DLL as it's loaded. This is a good, lightwei-ght alternative if you don't have the Windows program Dependency Walker available.
  • +message : logs Windows messages
  • +msgbox : logs when message boxes are displayed
  • +olerelay : dumps calls made through the typelibrary marshaller. It's a bit like +relay but works for a certain class of DCOM calls that wouldn't normally show up. Unfortunately, while this can be useful especially for debugging InstallShield or DCOM issues, this isn't a general COM relay mechanism. Since InstallShield/DCOM issues are quite advanced, it's recommended you ask for help if you want to try using this channel.
These functions are called a lot, but don't usually give any clues as to why a program might be failing.
  • +synchronous : forces X11 into synchronous mode
  • +tid : prefixes each debug output line with the ID of the thread that generated it. This is invaluable for debugging multithreaded applications since a context switch can occur at any time and without it, there's often no way to tell exactly what's going on inside the program. If you aren't sure if a program is concurrent, enable it anyway. Although no channel is free, this one has a very cheap processing cost, and you can always disable it if you're only seeing one thread.

Other Debugging Tips

  • If a program fails at startup with nothing to suggest why, you can use an +all trace. If your program seems to be failing a long way from an API call, you might also try [:Disassembly: disassembling] it to see if it's accessing some of the parameters passed in to !WinMain (for instance, Dungeon Keeper crashes if you run it without an absolute path for argv[0]).
  • If your logs are becoming too big to work with, try applying the [:Debug_trace_toggle_key: debug delay patch]. It lets you toggle logging on and off with the F12 key and also control the debug channels from within the source by using the libwine APIs.

Making +relay less verbose


# Make grep go fast
# Find top ten calls
cat > quiet.reg << _EOF



wine regedit quiet.reg


See Also