The DBUG Package
The MySQL server and most MySQL clients are compiled with the DBUG package originally made by Fred Fish. When one has configured MySQL for debugging, this package makes it possible to get a trace file of what the program is debugging. See Section D.1.2.
One uses the debug package by invoking the program with the --debug="..." or the -#... option.
Most MySQL programs have a default debug string that will be used if you don’t specify an option to --debug. The default trace file is usually /tmp/programname.trace on Unix and \programname.trace on Windows.
The debug control string is a sequence of colon-separated fields as follows:
<field_1>:<field_2>:...:<field_N>
Each field consists of a mandatory flag character followed by an optional “,” and comma-separated list of modifiers:
flag[,modifier,modifier,...,modifier]
The currently recognised flag characters are:
|
Flag |
Description |
|---|---|
|
d |
Enable output from DBUG_<N> macros for the current state. May be followed by a list of keywords that select output only for the DBUG macros with that keyword. An empty list of keywords implies output for all macros. |
|
D |
Delay after each debugger output line. The argument is the number of tenths of seconds to delay, subject to machine capabilities. That is, -#D,20 is a delay of 2 seconds. |
|
f |
Limit debugging and/or tracing, and profiling to the list of named functions. Note that a null list will disable all functions. The appropriate “d” or “t” flags must still be given. This flag only limits their ... |