1
<?xml version="1.0" encoding="utf-8"?>
2
<page xmlns="http://projectmallard.org/1.0/" type="topic" style="task" id="debug-tips" xml:lang="ro">
4
<info xmlns:facet="http://projectmallard.org/facet/1.0/">
5
<facet:tag key="all-pages" value="whatever"/> <!--Include page in index-->
6
<link type="guide" xref="index#anjuta-debug" group="fifth"/>
7
<revision pkgversion="3.0" version="0.1" date="2011-03-27" status="incomplete"/>
9
Debugging tips and tricks.
11
<credit type="author">
12
<name>Sébastien Granjoux</name>
13
<email>seb.sfo@free.fr</email>
15
<credit type="editor">
16
<name>Philip Chimento</name>
17
<email>philip.chimento@gmail.com</email>
21
<title>Indicații pentru depanare</title>
24
<title>Fixing GLib/GTK+ critical errors</title>
26
<p>Sometimes it can be difficult to track down where GLib critical errors are
27
occurring, since they do not stop the program.
28
You can set the program to stop as soon as it gets a GLib critical error, by setting
29
the environment variable <sys>G_DEBUG</sys> to the value
30
<sys>fatal_criticals</sys>.</p>
34
<p>Open the <link xref="run-parameters-dialog"/> by selecting
35
<guiseq><gui>Run</gui><gui>Program Parameters...</gui></guiseq> from the
39
<p>Click the plus sign next to <gui>Environment Variables</gui> to expand
40
the list of environment variables.</p>
43
<p>Click <gui>New</gui> to add a new entry to the list.</p>
46
<p>Fill in <gui>Name</gui> with <input>G_DEBUG</input> and <gui>Value</gui>
47
with <input>fatal_criticals</input>.</p>
50
<p>Click <gui>Apply</gui> to confirm the changes.</p>
53
<p>Run the program with the debugger by selecting
54
<guiseq><gui>Run</gui><gui>Debug Program</gui></guiseq> from the main menu.</p>
57
<p>Use the program until the critical error occurs.</p>
60
<p>When the debugger stops your program, look at the
61
<link xref="debug-stack"/> to check where this error comes from.</p>
65
<p>The top function with frame number 0 is in GLib, so you have to look
66
down in the stack. Typically the error originates from the topmost
67
function that belongs to your program.</p>