It is possible to turn on and off debugging output from
within the debugger using the set command. Please see the
WineDbg Command Reference section
(Section 1.7.10) for how to do this.
You can do the same using the task manager
(taskmgr) and selecting your application in
the application list. Right clicking on the application, and
selecting the debug option in the popup menu, will let you
select the modifications you want on the debug channels.
Another way to conditionally log debug output (e.g. in case of
very large installers which may create gigabytes of log
output) is to create a pipe:
Since the pipe is initially blocking (and thus wine as a whole),
you have to activate it by doing:
$cat /tmp/debug_pipe
(press Ctrl-C to stop pasting the pipe content)
Once you are about to approach the problematic part of the program,
you just do:
$cat /tmp/debug_pipe >/tmp/wine.log
to capture specifically the part that interests you from the
pipe without wasting excessive amounts of HDD space and
slowing down installation considerably.
The WINEDEBUG environment variable
controls the output of the debug messages.
It has the following syntax:
WINEDEBUG= [yyy]#xxx[,[yyy1]#xxx1]*
where
# is either + or
-
when the optional class argument (yyy)
is not present, then the statement will
enable(+)/disable(-)
all messages for the given channel (xxx)
on all classes. For example:
WINEDEBUG=+reg,-file
enables all messages on the reg
channel and disables all messages on the
file channel.
when the optional class argument (yyy)
is present, then the statement will enable
(+)/disable(-)
messages for the given channel (xxx)
only on the given class. For example:
WINEDEBUG=trace+reg,warn-file
enables trace messages on the reg
channel and disables warning messages on the
file channel.
also, the pseudo-channel all is also supported and it
has the intuitive semantics:
WINEDEBUG=+all -- enables all debug messages
WINEDEBUG=-all -- disables all debug messages
WINEDEBUG=yyy+all -- enables debug messages for class yyy on all
channels.
WINEDEBUG=yyy-all -- disables debug messages for class yyy on all
channels.
So, for example:
WINEDEBUG=warn-all -- disables all warning messages.
Also, note that at the moment:
the FIXME and ERR
classes are enabled by default
the TRACE and WARN
classes are disabled by default