groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] Debugging


From: Bertrand Garrigues
Subject: [groff] Debugging
Date: Thu, 10 Jan 2019 23:12:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

I find debugging groff quite uneasy, due to the fact that it uses
various programs with pipes; it's even worse when its is invoked by
'pdfmom' which makes several pass of groff to generate table of contents
and pdf links.

Therefore I would like to add a '--debug' or '--log' option to 'groff'
that will make groff log all the calls to the preprocessors and to troff
into a file (so that stdin and stderr will not be impacted) and also
spread this option to all the preprocessors who will dump their input
into file (this way a problem on a particular preprocessor could be
isolated and studied by invoking directly the preprocessor itself).
This would also make 'troff' dump its intermediate output.

I've also noticed a slightly odd thing in 'troff': there is a -D option
that is under a 'DEBUGGING' flag ('src/roff/troff/input.cpp') but as
'DEBUGGING' is defined the option is active (and undocumented).  This
option turns on a debug state, it looks usefull and could be extended to
display other information, but as 'troff' loads first its startup file
(/usr/local/share/groff/1.22.4/tmac/troffrc on my system) it displays a
lots of useless thing before actually printing the debugging information
of the input document you want to debug.  We would probably need a new
request to turn on and off the debug state of 'troff' so that a small
part of the input document can be debugged with this option.

Does anyone have some comments on these ideas?

Regards,

Bertrand



reply via email to

[Prev in Thread] Current Thread [Next in Thread]