<!-- Converted by db4-upgrade version 1.0 -->

<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="debuglib">

  <refmeta>
    <refentrytitle>DEBUGLIB</refentrytitle>
    <manvolnum>nged</manvolnum>
    <refmiscinfo class="source">BRL-CAD</refmiscinfo>
    <refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv xml:id="name">
    <refname>debuglib</refname>
    <refpurpose>Allows the user to set or check the debug flags used by
    <emphasis>librt</emphasis>.
    </refpurpose>
  </refnamediv>
  
  <!-- body begins here -->
  <refsynopsisdiv xml:id="synopsis">
    <cmdsynopsis sepchar=" ">
      <command>debuglib</command>    
      <arg choice="opt" rep="norepeat"><replaceable>hex_code</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  
  <refsection xml:id="description"><info><title>DESCRIPTION</title></info>
    
    <para>
      Allows the user to set or check the debug flags used by <emphasis>librt</emphasis>. 
      With no arguments, the <command>debuglib</command> command displays all the possible 
      settings for the <emphasis>librt</emphasis> debug flag and the current value. When 
      a <emphasis>hex_code</emphasis> is supplied, that value is used as the new value 
      for the flag. Similar debug commands for other <emphasis>BRL-CAD</emphasis> libraries 
      are <command>debugbu</command> for <emphasis>libbu</emphasis> and 
      <command>debugnmg</command>for the NMG portion of <emphasis>librt</emphasis>. Other 
      debugging commands include <command>debugmem</command> and <command>debugdir</command>.
    </para>
  </refsection>
  
  <refsection xml:id="examples"><info><title>EXAMPLES</title></info>
    
    <para>
      The first example shows the use of the <command>debuglib</command> command (without 
      an argument) to list the available debug values for <emphasis>librt</emphasis> and 
      the current value.  The second example shows the use of the <command>debuglib</command>
      command with a hex code, which sets the <emphasis>librt</emphasis> debug flag to that value.
    </para>
    <example><info><title>List available debug values for <emphasis>librt</emphasis> and the current value.</title></info>
      
      <para><prompt>mged&gt;</prompt> <userinput>debuglib</userinput></para>
      <para>Lists available debug values for <emphasis>librt</emphasis> and the current value.</para>
    </example>
    
    <example><info><title>Set the <emphasis>librt</emphasis> debug flag to a specific value.</title></info>
      
      <para>
	<prompt>mged&gt;</prompt><userinput>debuglib 1</userinput>
      </para>
      <para>
       Sets the <emphasis>librt</emphasis> debug flag to &lt;DEBUG_ALLRAYS&gt; (prints info about rays).
      </para>
    </example>
  </refsection>
  
  <info><corpauthor>BRL-CAD Team</corpauthor></info>
  
  <refsection xml:id="bug_reports"><info><title>BUG REPORTS</title></info>
    
    <para>
      Reports of bugs or problems should be submitted via electronic
      mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
    </para>
  </refsection>
</refentry>
