1<!--$Id: intro.so,v 10.24 2006/11/13 18:05:01 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB Reference Guide: Introduction to debugging</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<a name="2"><!--meow--></a> 12<table width="100%"><tr valign=top> 13<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Debugging Applications</dl></b></td> 14<td align=right><a href="/install/multiple.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/debug/compile.html"><img src="/images/next.gif" alt="Next"></a> 15</td></tr></table> 16<p align=center><b>Introduction to debugging</b></p> 17<p>Because Berkeley DB is an embedded library, debugging applications that use 18Berkeley DB is both harder and easier than debugging a separate server. 19Debugging can be harder because when a problem arises, it is not always 20readily apparent whether the problem is in the application, is in the 21database library, or is a result of an unexpected interaction between 22the two. Debugging can be easier because it is easier to track down a 23problem when you can review a stack trace rather than deciphering 24interprocess communication messages. This chapter is intended to assist 25you with debugging applications and reporting bugs to us so that we can 26provide you with the correct answer or fix as quickly as possible.</p> 27<p>When you encounter a problem, there are a few general actions you can 28take:</p> 29<br> 30<b>Review the Berkeley DB error output:</b><ul compact><li><p>If an error output mechanism has been configured in the Berkeley DB 31environment, additional run-time error messages are made available to 32the applications. If you are not using an environment, it is well worth 33modifying your application to create one so that you can get more 34detailed error messages. See <a href="runtime.html">Run-time error 35information</a> for more information on configuring Berkeley DB to output these 36error messages.</p></ul> 37<b>Review <a href="/api_c/env_set_verbose.html">DB_ENV->set_verbose</a>:</b><ul compact><li><p>Check the list of flags for the <a href="/api_c/env_set_verbose.html">DB_ENV->set_verbose</a> function, and 38see if any of them will produce additional information that might help 39understand the problem.</p></ul> 40<b>Add run-time diagnostics:</b><ul compact><li><p>You can configure and build Berkeley DB to perform run-time diagnostics. (By 41default, these checks are not done because they can seriously impact 42performance.) See <a href="compile.html">Compile-time configuration</a> for more 43information.</p></ul> 44<b>Apply all available patches:</b><ul compact><li><p>Before reporting a problem in Berkeley DB, please upgrade to the latest Berkeley DB 45release, if possible, or at least make sure you have applied any updates 46available for your release from the 47<a href="http://www.oracle.com/technology/software/products/berkeley-db/db/index.html">Berkeley DB web site</a>.</p></ul> 48<b>Run the test suite:</b><ul compact><li><p>If you see repeated failures or failures of simple test cases, run the 49Berkeley DB test suite to determine whether the distribution of Berkeley DB you are 50using was built and configured correctly.</p></ul> 51<br> 52<table width="100%"><tr><td><br></td><td align=right><a href="/install/multiple.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/debug/compile.html"><img src="/images/next.gif" alt="Next"></a> 53</td></tr></table> 54<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 55</body> 56</html> 57