Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccb8a9af authored by David Friedman's avatar David Friedman Committed by Android Git Automerger
Browse files

am b510225e: Merge "docs: replacing command line tool instructions with Studio...

am b510225e: Merge "docs: replacing command line tool instructions with Studio and Monitor steps" into lmp-docs

* commit 'b510225e':
  docs: replacing command line tool instructions with Studio and Monitor steps
parents 268a7c19 b510225e
Loading
Loading
Loading
Loading
+24 −29
Original line number Original line Diff line number Diff line
@@ -28,22 +28,17 @@ parent.link=index.html
    </div>
    </div>
  </div>
  </div>


  <p>Android ships with a debugging tool called the Dalvik Debug Monitor Server (DDMS), which
  <p>Android Studio includes a debugging tool called the Dalvik Debug Monitor Server (DDMS), which
  provides port-forwarding services, screen capture on the device, thread and heap information on
  provides port-forwarding services, screen capture on the device, thread and heap information on
  the device, logcat, process, and radio state information, incoming call and SMS spoofing,
  the device, logcat, process, and radio state information, incoming call and SMS spoofing,
  location data spoofing, and more. This page provides a modest discussion of DDMS features; it is
  location data spoofing, and more. This page provides a modest discussion of DDMS features; it is
  not an exhaustive exploration of all the features and capabilities.</p>
  not an exhaustive exploration of all the features and capabilities.</p>


  <h2 id="running">Running DDMS</h2>
  <h2 id="running">Running DDMS</h2>
  <p>DDMS is integrated into Eclipse and is also shipped in the <code>tools/</code> directory of the
  <p>DDMS is integrated into Android Studio. To use it, launch the
  SDK. DDMS works with both the emulator and a connected device. If both are connected and running simultaneously, 
  <a href="{@docRoot}tools/help/monitor.html">Android Device Monitor</a>, and click the
  DDMS defaults to the emulator.</p>
  <strong>DDMS</strong> menu button. DDMS works with both the emulator and a
  
  connected device. If both are connected and running simultaneously, DDMS defaults to the emulator.</p>
  <ul>
    <li>From Eclipse: Click <strong>Window > Open Perspective > Other... > DDMS</strong>.</li>
    <li>From the command line: Type <code>ddms</code> (or <code>./ddms</code> on Mac/Linux) from the <code>tools/</code>
    directory. </li>
  </ul>




  <h2 id="how-ddms-works">How DDMS Interacts with a Debugger</h2>
  <h2 id="how-ddms-works">How DDMS Interacts with a Debugger</h2>
@@ -70,7 +65,7 @@ parent.link=index.html
  all the VMs on a device. The traffic that is forwarded is determined by the currently selected process
  all the VMs on a device. The traffic that is forwarded is determined by the currently selected process
  in the DDMS Devices view.</p>
  in the DDMS Devices view.</p>


  <p>The following screenshot shows a typical DDMS screen in Eclipse. If you are starting DDMS from
  <p>The following screenshot shows a typical DDMS screen. If you are starting DDMS from
  the command line, the screen is slightly different, but much of the functionality is identical.
  the command line, the screen is slightly different, but much of the functionality is identical.
  Notice that the highlighted process, <code>com.android.email</code>, that is running in the emulator
  Notice that the highlighted process, <code>com.android.email</code>, that is running in the emulator
  has the debugging port 8700 assigned to it as well as 8606. This signifies that DDMS is currently
  has the debugging port 8700 assigned to it as well as 8606. This signifies that DDMS is currently
@@ -81,7 +76,7 @@ parent.link=index.html
  <p class="img-caption"><strong>Figure 1.</strong>
  <p class="img-caption"><strong>Figure 1.</strong>
  Screenshot of DDMS</p>
  Screenshot of DDMS</p>


  <p>If you are not using Eclipse and ADT, read <a href=
  <p>If you are using the command line, read <a href=
  "{@docRoot}tools/debugging/debugging-projects-cmdline.html#debuggingPort">Configuring
  "{@docRoot}tools/debugging/debugging-projects-cmdline.html#debuggingPort">Configuring
  your IDE to attach to the debugging port</a>, for more information on attaching your
  your IDE to attach to the debugging port</a>, for more information on attaching your
  debugger.</p>
  debugger.</p>
@@ -97,8 +92,8 @@ parent.link=index.html


  <h2 id="using-ddms">Using DDMS</h2>
  <h2 id="using-ddms">Using DDMS</h2>
  The following sections describe how to use DDMS and the various tabs and panes that are part of the
  The following sections describe how to use DDMS and the various tabs and panes that are part of the
  DDMS GUI. The Eclipse version and the command line version have minor UI differences, but the 
  DDMS GUI. The Android Studio version and the command line version have minor UI differences, but
  same functionality. For information on running DDMS, see the previous section in this document,
  the same functionality. For information on running DDMS, see the previous section in this document,
  <a href="#running">Running DDMS</a>.
  <a href="#running">Running DDMS</a>.




+9 −6
Original line number Original line Diff line number Diff line
@@ -177,12 +177,15 @@ adb pull /sdcard/calc.trace /tmp


  <h2 id="runningtraceview">Viewing Trace Files in Traceview</h2>
  <h2 id="runningtraceview">Viewing Trace Files in Traceview</h2>


  <p>To run Traceview and view the trace files, enter <code>traceview
  <p>To run Traceview and view the trace files:</p>
  &lt;trace-base-name&gt;</code>. For example, to run Traceview on the example files copied in the
  <ul>
  previous section, use:</p>
    <li>start the
  <pre>
    <a href="{@docRoot}tools/help/monitor.html">Android Device Monitor</a>. </li>
traceview /tmp/calc
    <li>In the Android Device Monitor tool bar, click <strong>DDMS</strong> and select a process. </li>
</pre>
    <li>Click the <strong>Start Method Profiling</strong> icon to start method profiling. </li>
    <li>After the profiling is complete, click the <strong>Stop Method Profiling</strong> icon to
    display the traceview. </li>
   </ul> 


  <p class="note"><strong>Note:</strong> If you are trying to view the trace logs of an application 
  <p class="note"><strong>Note:</strong> If you are trying to view the trace logs of an application 
  that is built with ProGuard enabled (release mode build), some method and member names might be obfuscated.
  that is built with ProGuard enabled (release mode build), some method and member names might be obfuscated.
+14 −4
Original line number Original line Diff line number Diff line
@@ -15,8 +15,8 @@ page.title=Device Monitor


<p>Android Device Monitor is a stand-alone tool that provides a graphical user interface for
<p>Android Device Monitor is a stand-alone tool that provides a graphical user interface for
several Android application debugging and analysis tools. The Monitor tool does not
several Android application debugging and analysis tools. The Monitor tool does not
require installation of an integrated development environment, such as Eclipse, and encapsulates the
require installation of an integrated development environment, such as Android Studio, and
following tools:</p>
encapsulates the following tools:</p>


<ul>
<ul>
  <li><a href="{@docRoot}tools/debugging/ddms.html">DDMS</a></li>
  <li><a href="{@docRoot}tools/debugging/ddms.html">DDMS</a></li>
@@ -30,9 +30,19 @@ following tools:</p>


<h2 id="usage">Usage</h2>
<h2 id="usage">Usage</h2>


<p>To start Device Monitor, enter the following command from the SDK <code>tools/</code>
<p>To start Device Monitor:</p>
directory:</p>

<ul>
  <li>From Android Studio, choose <strong>Tools &gt; Android Device Monitor</strong> or click
    the Android Device Monitor icon
    <img src="{@docRoot}images/tools/hierarchicalviewer-icon.png" alt=""/>.
  </li>
  <li>From the command line, in the SDK <code>tools/</code> directory, enter the following command:
  <pre>monitor</pre>
  <pre>monitor</pre>
  </li>
</ul>




<p>Start an Android emulator or connect an Android device via USB cable, and connect Device
<p>Start an Android emulator or connect an Android device via USB cable, and connect Device
Monitor to the device by selecting it in the <strong>Devices</strong> window.</p>
Monitor to the device by selecting it in the <strong>Devices</strong> window.</p>
+18 −6
Original line number Original line Diff line number Diff line
@@ -6,11 +6,23 @@ parent.link=index.html
<p>Traceview is a graphical viewer for execution logs saved by your application.
<p>Traceview is a graphical viewer for execution logs saved by your application.
Traceview can help you debug your application and profile its performance.</p>
Traceview can help you debug your application and profile its performance.</p>


<p>To start Traceview, enter the following command from the SDK <code>tools/</code> directory:</p>
<p>To start the Traceview tool:</p>
  <pre>traceview</pre>

</ol>
<ul>
 <li>Start the <a href="{@docRoot}tools/help/monitor.html">Android Device Monitor</a>. </li>
 <li>In the Android Device Monitor tool bar, click <strong>DDMS</strong> and select a process. </li>
 <li>Click the <strong>Start Method Profiling</strong> icon to start method profiling. </li>
 <li>After the profiling is complete, click the <strong>Stop Method Profiling</strong> icon to
   display the traceview. </li>
</ul>



<p>For more information on how to use Traceview, see
<p>For more information on how to use Traceview, see
<a href="{@docRoot}tools/debugging/debugging-tracing.html">Profiling with Traceview and dmtracedump</a>
<a href="{@docRoot}tools/debugging/debugging-tracing.html">Profiling with Traceview and
dmtracedump</a>.
</p>
</p>


<p class="note"><strong>Note:</strong> Running <code>traceview</code> from the command line
has been deprecated. </p>