m4: Debug Output
1
1 7.4 Saving debugging output
1 ===========================
1
1 Debug and tracing output can be redirected to files using either the
1 '--debugfile' option to 'm4' (⇒Invoking m4 Debugging options.), or
1 with the builtin macro 'debugfile':
1
1 -- Builtin: debugfile ([FILE])
1 Sends all further debug and trace output to FILE, opened in append
1 mode. If FILE is the empty string, debug and trace output are
1 discarded. If 'debugfile' is called without any arguments, debug
1 and trace output are sent to standard error. This does not affect
1 warnings, error messages, or 'errprint' output, which are always
1 sent to standard error. If FILE cannot be opened, the current
1 debug file is unchanged, and an error is issued.
1
1 The expansion of 'debugfile' is void.
1
1 $ m4 -d
1 traceon(`divnum')
1 =>
1 divnum(`extra')
1 error->m4:stdin:2: Warning: excess arguments to builtin `divnum' ignored
1 error->m4trace: -1- divnum(`extra') -> `0'
1 =>0
1 debugfile()
1 =>
1 divnum(`extra')
1 error->m4:stdin:4: Warning: excess arguments to builtin `divnum' ignored
1 =>0
1 debugfile
1 =>
1 divnum
1 error->m4trace: -1- divnum -> `0'
1 =>0
1