17ec681f3SmrgDebugging Tips 27ec681f3Smrg============== 37ec681f3Smrg 47ec681f3SmrgNormally Mesa (and OpenGL) records but does not notify the user of 57ec681f3Smrgerrors. It is up to the application to call ``glGetError`` to check for 67ec681f3Smrgerrors. Mesa supports an environment variable, ``MESA_DEBUG``, to help 77ec681f3Smrgwith debugging. If ``MESA_DEBUG`` is defined, a message will be printed 87ec681f3Smrgto stdout whenever an error occurs. 97ec681f3Smrg 107ec681f3SmrgMore extensive error checking is done in DEBUG builds 117ec681f3Smrg(``--buildtype debug`` for Meson). 127ec681f3Smrg 137ec681f3SmrgIn your debugger you can set a breakpoint in ``_mesa_error()`` to trap 147ec681f3SmrgMesa errors. 157ec681f3Smrg 167ec681f3SmrgThere is a display list printing/debugging facility. See the end of 177ec681f3Smrg``src/dlist.c`` for details. 18