| page.title=Debugging from Eclipse with ADT |
| parent.title=Debugging |
| parent.link=index.html |
| @jd:body |
| |
| <div id="qv-wrapper"> |
| <div id="qv"> |
| <h2>In this document</h2> |
| |
| <ol> |
| <li><a href="#tools">The Debug Perspective</a></li> |
| |
| <li><a href="#toptips">The DDMS Perspective</a></li> |
| </ol> |
| </div> |
| </div> |
| |
| <p>If you are developing in Eclipse with the ADT plugin, you can use the built-in Java Debugger, |
| along with DDMS, to debug your applications. To access the debugger and |
| DDMS, Eclipse displays the debugger and DDMS features as perspectives, which are customized |
| Eclipse views that display certain tabs and windows depending on the perspective that you are in. |
| Eclipse also takes care of starting the ADB host daemon for you, so you do not have to run this |
| manually.</p> |
| |
| <h2>The Debug Perspective in Eclipse</h2> |
| |
| <p>The Debug Perspective in Eclipse gives you access to the following tabs:</p> |
| |
| <ul> |
| <li>Debug - Displays previously and currently debugged Android applications and its currently |
| running threads</li> |
| |
| <li>Variables - When breakpoints are set, displays variable values during code execution</li> |
| |
| <li>Breakpoints - Displays a list of the set breakpoints in your application code</li> |
| |
| <li>LogCat - Allows you to view system log messages in real time. The LogCat tab is also |
| available in the DDMS perspective.</li> |
| </ul> |
| <p>You can access the Debug Perspective by clicking <strong>Window > Open Perspective > |
| Debug</strong>. Refer to the appropriate documentation for the Eclipse debugger for more |
| information.</p> |
| |
| <h2>The DDMS Perspective</h2> |
| <p>The DDMS Perspective in Eclipse lets you access all of the features |
| of DDMS from within the Eclipse IDE. The following sections of DDMS are available to you:</p> |
| |
| <ul> |
| <li>Devices - Shows the list of devices and AVDs that are connected to ADB.</li> |
| |
| <li>Emulator Control - Lets you carry out device functions.</li> |
| |
| <li>LogCat - Lets you view system log messages in real time.</li> |
| |
| <li>Threads - Shows currently running threads within a VM.</li> |
| |
| <li>Heap - Shows heap usage for a VM.</li> |
| |
| <li>Allocation Tracker - Shows the memory allocation of objects.</li> |
| |
| <li>File Explorer - Lets you explore the device's file system.</li> |
| </ul> |
| <p>To access the DDMS perspective, go to <strong>Window > Open Perspective > |
| DDMS</strong>. If DDMS does not appear, go to <strong>Window > Open Perspective > Other |
| ...</strong> and select <strong>DDMS</strong> from the Open Perspective window that appears. For |
| more information on using DDMS, see <a href="ddms.html">Using the Dalvik Debug Monitor Server</a>. |
| </p> |