19 19 to understand, it is often useful to run it in the [command-line shell]
20 20 with the ".eqp full" setting. When ".eqp" is set to FULL, the shell
21 21 automatically shows the [EXPLAIN] and [EXPLAIN QUERY PLAN] output for
22 22 each command prior to actually running that command.
23 23 24 24 <p>For added readability, also set ".echo on" so that the output contains
25 25 the original SQL text.
26 + 27 +<p>The newer ".eqp trace" command does everything that ".eqp full" does 28 +and also turns on [vdbe_trace|VDBE tracing]. 26 29 </li>
27 30 28 31 <li>
29 32 <p><b>Use compile-time options to enable debugging features.</b>
30 33 31 34 <p>Suggested compile-time options include:
32 35 <ul>
................................................................................ 76 79 77 80 <p>When debugging the [bytecode] generator, it is often useful to know
78 81 where a particular opcode is being generated. To find this easily,
79 82 run the script in a debugger. Set a breakpoint on the "test_addoptrace"
80 83 routine. Then run the "PRAGMA vdbe_addoptrace=ON;" followed by the
81 84 SQL statement in question. Each opcode will be displayed as it is
82 85 appended to the VDBE program, and the breakpoint will fire immediately
83 -thereafter. Step until reaching the opcode and question then look backwards 86 +thereafter. Step until reaching the opcode then look backwards 84 87 in the stack to see where and how it was generated.
85 88 86 89 <p>This only works when compiled with [SQLITE_DEBUG].
87 90 </li>
88 91 89 92 <li>
90 93 <p><b>Using the ".selecttrace" and ".wheretrace" shell commands</b>
................................................................................ 102 105 </li>
103 106 104 107 <li>
105 108 <p><b>Disable the [lookaside memory allocator]</b>
106 109 107 110 <p>When looking for memory allocation problems (memory leaks, use-after-free
108 111 errors, buffer overflows, etc) it is sometimes useful to disable the
109 -[lookaside memory allocator] then run the test under valgrind. 112 +[lookaside memory allocator] then run the test under valgrind or MSAN or 113 +some other heap memory debugging tool. 110 114 The lookaside memory allocator can
111 115 be disabled at start-time using the [SQLITE_CONFIG_LOOKASIDE]
112 116 interface. The [command-line shell] will use that interface to
113 117 disable lookaside if it is started with the "--lookaside 0 0"
114 118 command line option.
115 119 </li>
116 120 </ol>

This page was generated in about
0.005s by
Fossil 2.9 [356c0d017e] 2019-05-23 17:18:56