1bf215546Sopenharmony_ciDebugging Tips 2bf215546Sopenharmony_ci============== 3bf215546Sopenharmony_ci 4bf215546Sopenharmony_ciNormally Mesa (and OpenGL) records but does not notify the user of 5bf215546Sopenharmony_cierrors. It is up to the application to call ``glGetError`` to check for 6bf215546Sopenharmony_cierrors. Mesa supports an environment variable, ``MESA_DEBUG``, to help 7bf215546Sopenharmony_ciwith debugging. If ``MESA_DEBUG`` is defined, a message will be printed 8bf215546Sopenharmony_cito stdout whenever an error occurs. 9bf215546Sopenharmony_ci 10bf215546Sopenharmony_ciMore extensive error checking is done in DEBUG builds 11bf215546Sopenharmony_ci(``--buildtype debug`` for Meson). 12bf215546Sopenharmony_ci 13bf215546Sopenharmony_ciIn your debugger you can set a breakpoint in ``_mesa_error()`` to trap 14bf215546Sopenharmony_ciMesa errors. 15bf215546Sopenharmony_ci 16bf215546Sopenharmony_ciThere is a display list printing/debugging facility. See the end of 17bf215546Sopenharmony_ci``src/dlist.c`` for details. 18