MiniVend comes with debugging output disabled by default -- this is for speed and code compactness. To enable debugging, change directory to the MiniVend root (the software directory) and run:
# Must change to MiniVend software directory first! bin/ifdef -y -t DEBUG
This only works for MiniVend 3.06 and above. Earlier MiniVend versions have only a crude debug available with the -D startup options.
To disable, use the command
# Must change to MiniVend software directory first! bin/ifdef -n -t DEBUG
Note that some warnings may be generated by the debugging itself, typically ``use of uninitialized variable'' warnings generated by undefined debug references. You can safely ignore these if they occur pointing to lines where the logDebug routine is called.
The controls are accessed in one of several ways.
nnnn
, a numeric option set, is present, that debug level will be set. The
default level is 4097, running in the foreground with only a few debug
outputs (normal mode) present. If you want to run in the foreground with
maximum information, use the level 4351.
IMPORTANT NOTE: This may affect some program operations. If something new fails in debug mode, try it again in normal background server mode. In particular, changes to the configuration made on the fly in the page will stick since the process is not forked.
DESCRIPTION NUM TEXT DISABLE ----------- --- ----- ----- Disable all debug 0 off N/A Normal operations 1 normal !normal Tag interpretation 2 tag !tag Database operations 4 data !data Configuration info 8 config !config Search operations 16 search !search Session operations 32 session !session Server operations 64 server !server Cache/benchmark 128 cache !cache Show calling package 512 caller !caller Show in page comment 1024 comment !comment Place in mvdebug 2048 N/A N/A Run in foreground 4096 N/A N/A Verbose in HTML 2047 Verbose foreground 5119
NOTE: The text levels only operate in conjunction with [tag flag debug]
.
If you want to output the debug information embedded in an HTML comment at the end of the page you get from your browser, add level 1024. This overrides the output to mvdebug temporarily, or to foreground output indefinitely, if those are enabled.
Use this to set verbose but no tag details, with output to HTML:
[tag flag debug]comment verbose !tag[/tag]
Use this to look at only database operations, with output to HTML:
[tag flag debug]comment !verbose data[/tag]
# UNIX C-shell types (tcsh, csh, etc.) setenv MINIVEND_DEBUG 1279
# UNIX Bourne-shell types (bash, sh, ksh, etc.) MINIVEND_DEBUG=1279 export MINIVEND_DEBUG
# Windows/DOS command box set MINIVEND_DEBUG=1279
minivend.cfg
) and for each catalog (in catalog.cfg
) with the DebugMode directive, with levels as above.
Yes
in both minivend.cfg
and catalog.cfg
. Debug information will be included if available and level 1024 is set.
The debug mode of 8192 will enable DisplayErrors for every catalog.