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