Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 1 | Debugging Tips |
| 2 | ============== |
| 3 | |
| 4 | Normally Mesa (and OpenGL) records but does not notify the user of |
| 5 | errors. It is up to the application to call ``glGetError`` to check for |
| 6 | errors. Mesa supports an environment variable, ``MESA_DEBUG``, to help |
| 7 | with debugging. If ``MESA_DEBUG`` is defined, a message will be printed |
| 8 | to stdout whenever an error occurs. |
| 9 | |
| 10 | More extensive error checking is done in DEBUG builds |
Erik Faye-Lund | 0c90662 | 2020-09-29 19:01:13 +0200 | [diff] [blame^] | 11 | (``--buildtype debug`` for Meson, ``build=debug`` for SCons). |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 12 | |
| 13 | In your debugger you can set a breakpoint in ``_mesa_error()`` to trap |
| 14 | Mesa errors. |
| 15 | |
| 16 | There is a display list printing/debugging facility. See the end of |
| 17 | ``src/dlist.c`` for details. |