Home | History | Annotate | Download | only in debugging
      1 page.title=Debugging from Eclipse with ADT
      2 parent.title=Debugging
      3 parent.link=index.html
      4 @jd:body
      5 
      6  <div id="qv-wrapper">
      7     <div id="qv">
      8       <h2>In this document</h2>
      9 
     10       <ol>
     11         <li><a href="#tools">The Debug Perspective</a></li>
     12 
     13         <li><a href="#toptips">The DDMS Perspective</a></li>
     14       </ol>
     15     </div>
     16   </div>
     17   
     18   <p>If you are developing in Eclipse with the ADT plugin, you can use the built-in Java Debugger,
     19   along with DDMS, to debug your applications. To access the debugger and
     20   DDMS, Eclipse displays the debugger and DDMS features as perspectives, which are customized
     21   Eclipse views that display certain tabs and windows depending on the perspective that you are in.
     22   Eclipse also takes care of starting the ADB host daemon for you, so you do not have to run this
     23   manually.</p>
     24 
     25   <h2>The Debug Perspective in Eclipse</h2>
     26 
     27   <p>The Debug Perspective in Eclipse gives you access to the following tabs:</p>
     28 
     29   <ul>
     30     <li>Debug - Displays previously and currently debugged Android applications and its currently
     31     running threads</li>
     32 
     33     <li>Variables - When breakpoints are set, displays variable values during code execution</li>
     34 
     35     <li>Breakpoints - Displays a list of the set breakpoints in your application code</li>
     36 
     37     <li>LogCat - Allows you to view system log messages in real time. The LogCat tab is also
     38     available in the DDMS perspective.</li>
     39   </ul>
     40   <p>You can access the Debug Perspective by clicking <strong>Window &gt; Open Perspective &gt;
     41   Debug</strong>. Refer to the appropriate documentation for the Eclipse debugger for more
     42   information.</p>
     43 
     44   <h2>The DDMS Perspective</h2>
     45   <p>The DDMS Perspective in Eclipse lets you access all of the features
     46   of DDMS from within the Eclipse IDE. The following sections of DDMS are available to you:</p>
     47 
     48   <ul>
     49     <li>Devices - Shows the list of devices and AVDs that are connected to ADB.</li>
     50 
     51     <li>Emulator Control - Lets you carry out device functions.</li>
     52 
     53     <li>LogCat - Lets you view system log messages in real time.</li>
     54 
     55     <li>Threads - Shows currently running threads within a VM.</li>
     56 
     57     <li>Heap - Shows heap usage for a VM.</li>
     58 
     59     <li>Allocation Tracker - Shows the memory allocation of objects.</li>
     60 
     61     <li>File Explorer - Lets you explore the device's file system.</li>
     62   </ul>
     63   <p>To access the DDMS perspective, go to <strong>Window &gt; Open Perspective &gt;
     64   DDMS</strong>. If DDMS does not appear, go to <strong>Window &gt; Open Perspective &gt; Other
     65   ...</strong> and select <strong>DDMS</strong> from the Open Perspective window that appears. For
     66   more information on using DDMS, see <a href="ddms.html">Using the Dalvik Debug Monitor Server</a>.
     67   </p>