Documentation Source Text

Check-in [61444ae7e4]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Comment:Add a note about the ".breakpoint" shell command to the "debugging.html" page.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
User & Date: drh 2019-03-23 16:09:01
Fix a documentation error: The preprocessor macro is SQLITE_HAVE_ZLIB, not SQLITE_USE_ZLIB. However the USE_ZLIB=1 option is what Makefile.msc expects. check-in: 85f5f65d9f user: drh tags: trunk
Add a note about the ".breakpoint" shell command to the "debugging.html" page. check-in: 61444ae7e4 user: drh tags: trunk
Improvements to the debugging.html webpage. check-in: ad08afecb8 user: drh tags: trunk
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to pages/

   100    100   SELECT statements and WHERE clauses, respectively.
   101    101   The ".selecttrace" and ".wheretrace" commands each take a numeric
   102    102   argument which can be expressed in hexadecimal.  Each bit turns on
   103    103   various parts of debugging.  Values of "0xfff" and "0xff" are commonly
   104    104   used.  Use an argument of "0" to turn all tracing output back off.
   105    105   </li>
   106    106   
          107  +<li>
          108  +<p><b>Using the ".breakpoint" shell command</b>
          109  +
          110  +<p>The ".breakpoint" command in the CLI does nothing but invoke the
          111  +procedure named "test_breakpoint()", which is a no-op.
          112  +
          113  +<p>If you have a script and you want to start debugging at some point
          114  +half-way through that script, simply set a breakpoing in gdb (or whatever
          115  +debugger you are using) on the test_breakpoint() function, and add a
          116  +".breakpoint" command where you want to stop.  When you reach that first
          117  +breakpoint, set whatever additional breakpoints are variable traces you
          118  +need.
          119  +
   107    120   <li>
   108    121   <p><b>Disable the [lookaside memory allocator]</b>
   109    122   
   110    123   <p>When looking for memory allocation problems (memory leaks, use-after-free
   111    124   errors, buffer overflows, etc) it is sometimes useful to disable the
   112    125   [lookaside memory allocator] then run the test under valgrind or MSAN or
   113    126   some other heap memory debugging tool.