Hints for Debugging SQLite
Debugging Hints
The following is a random assortment of techniques used by the SQLite developers to trace, examine, and understand the behavior of the core SQLite library.
These techniques are designed to aid in understanding the core SQLite library itself, not applications that merely use SQLite.
-
Use the ".eqp full" option on the command-line shell
When you have a SQL script that you are debugging or trying to understand, it is often useful to run it in the command-line shell with the ".eqp full" setting. When ".eqp" is set to FULL, the shell automatically shows the EXPLAIN and EXPLAIN QUERY PLAN output for each command prior to actually running that command.
For added readability, also set ".echo on" so that the output contains the original SQL text.