debugging.html revision 36da0459e4d0b12ab46f0e2090d107a22f68844a
1<HTML>
2
3<TITLE>Debugging Tips</TITLE>
4
5<link rel="stylesheet" type="text/css" href="mesa.css"></head>
6
7<BODY>
8
9<H1>Debugging Tips</H1>
10
11<p>
12   Normally Mesa (and OpenGL) records but does not notify the user of
13   errors.  It is up to the application to call
14   <code>glGetError</code> to check for errors.  Mesa supports an
15   environment variable, MESA_DEBUG, to help with debugging.  If
16   MESA_DEBUG is defined, a message will be printed to stdout whenever
17   an error occurs.
18</p>
19
20<p>
21   More extensive error checking is done when Mesa is compiled with the
22   DEBUG symbol defined.  You'll have to edit the Make-config file and
23   add -DDEBUG to the CFLAGS line for your system configuration.  You may
24   also want to replace any optimization flags with the -g flag so you can
25   use your debugger.  After you've edited Make-config type 'make clean'
26   before recompiling.
27</p>
28<p>
29   In your debugger you can set a breakpoint in _mesa_error() to trap Mesa
30   errors.
31</p>
32<p>
33   There is a display list printing/debugging facility.  See the end of
34   src/dlist.c for details.
35</p>
36
37</BODY>
38</HTML>
39