Previous: Debug Levels, Up: Debugging
Debug and tracing output can be redirected to files using either the
--debugfile option to m4
(see Invoking m4), or with the
builtin macro debugfile
:
Sends all further debug and trace output to file. If file is empty, debug and trace output are discarded. If
debugfile
is called without any arguments, debug and trace output are sent to standard error. This does not affect warnings, error messages, orerrprint
output, which are always sent to standard error. If file cannot be opened, the current debug file is unchanged.The expansion of
debugfile
is void.
traceon(`divnum') => divnum(`extra') error-->m4:stdin:2: Warning: excess arguments to builtin `divnum' ignored error-->m4trace: -1- divnum(`extra') -> `0' =>0 debugfile() => divnum(`extra') error-->m4:stdin:4: Warning: excess arguments to builtin `divnum' ignored =>0 debugfile => divnum error-->m4trace: -1- divnum -> `0' =>0