Debugging Evince
First you'll need to get the source code. Once you have a working copy you need to enable debugging using the following configure option.
meson --debug
Debug messages
At execution time, you must enable the debug messages. To enable the debug messages, set the environment variable for the section you want to debug.
The following sections are available:
jobs, borders
Example
EV_DEBUG=jobs evince document.pdf
To profile the jobs: Example
EV_PROFILE_JOBS=1 evince document.pdf
Debug Poppler messages
Poppler is the library used by Evince to render PDF documents. When a document presents error, or there are issues in Poppler to handle it, the output can be seen by setting G_MESSAGES_DEBUG to enable debug messages for Poppler.
Example
G_MESSAGES_DEBUG=Poppler evince document.pdf
or
G_MESSAGES_DEBUG=all evince document.pdf
'Show borders' debugging hint
Evince can show a border around the following graphical elements:
- text characters
- links
- form elements
- annotations
- images
- media elements
- selections
this can be very helpful when debugging display issues related to those elements, to activate it you just need to set two env vars when calling Evince from a terminal, eg. to show annotation borders:
EV_DEBUG=borders EV_DEBUG_SHOW_BORDERS=annots evince
where EV_DEBUG_SHOW_BORDERS can be set to any of the following values: chars links forms annots images media selections