am 2bba0c94: am 892577b0: am 86db5b43: am ff88ac5e: am 7a69c2de: docs: debugging studio [CP]

* commit '2bba0c94f3e7726cc58d470094acd116db4ab36b':
  docs: debugging studio [CP]
This commit is contained in:
Rich Slogar
2014-12-08 19:38:36 +00:00
committed by Android Git Automerger
3 changed files with 23 additions and 26 deletions

View File

@@ -18,7 +18,7 @@ parent.link=index.html
</div> </div>
</div> </div>
<p>If you are not using Eclipse to develop, you can still take advantage of all the tools that <p>If you are not using Android Studio to develop, you can still take advantage of all the tools that
the Android SDK provides for debugging. A basic debugging environment consists of:</p> the Android SDK provides for debugging. A basic debugging environment consists of:</p>
<ul> <ul>
@@ -36,7 +36,7 @@ parent.link=index.html
<h2 id="start-debugging">Starting a debugging environment</h2> <h2 id="start-debugging">Starting a debugging environment</h2>
<p>A Java Debugger assists you in finding problems with <p>A Java Debugger assists you in finding problems with
your code by letting you set breakpoints, step through execution of your application, and examine your code by letting you set breakpoints, step through execution of your application, and examine
variable values. Since you are not using Eclipse, you have to manually start up the debugging variable values. Since you are not using Android Studio, you have to manually start up the debugging
environment yourself by running a few tools that are provided in the Android SDK. To begin environment yourself by running a few tools that are provided in the Android SDK. To begin
debugging your application, follow these general steps:</p> debugging your application, follow these general steps:</p>
@@ -46,8 +46,8 @@ parent.link=index.html
<li>Start DDMS from the sdk <code>/tools</code> directory. This also starts ADB if it is <li>Start DDMS from the sdk <code>/tools</code> directory. This also starts ADB if it is
not already started. You should see your device appear in DDMS.</li> not already started. You should see your device appear in DDMS.</li>
<li>Install and run your <code>.apk</code> file on the device or emulator. In DDMS, you should see your <li>Install and run your <code>.apk</code> file on the device or emulator. In DDMS, you should
application running under the device that you installed it to.</li> see your application running under the device that you installed it to.</li>
<li>Attach your debugger to the debugging port 8700, or to the specific port shown for the <li>Attach your debugger to the debugging port 8700, or to the specific port shown for the
application in DDMS.</li> application in DDMS.</li>
@@ -62,7 +62,7 @@ parent.link=index.html
<p>Your IDE should attach to your application running on the emulator, showing you its threads <p>Your IDE should attach to your application running on the emulator, showing you its threads
and allowing you to suspend them, inspect their state, and set breakpoints. If you selected "Wait and allowing you to suspend them, inspect their state, and set breakpoints. If you selected "Wait
for debugger" in the Development settings panel the application will run when Eclipse connects, for debugger" in the Development settings panel the application will run when Android Studio connects,
so you will need to set any breakpoints you want before connecting.</p> so you will need to set any breakpoints you want before connecting.</p>
<p>Changing either the application being debugged or the "Wait for debugger" option causes the <p>Changing either the application being debugged or the "Wait for debugger" option causes the

View File

@@ -10,7 +10,6 @@ page.title=Debugging with Android Studio
<ol> <ol>
<li><a href="#attachDebug">Attach the debugger to a running process</a></li> <li><a href="#attachDebug">Attach the debugger to a running process</a></li>
</ol> </ol>
</li>
<li><a href="#systemLog">Use the System Log</a> <li><a href="#systemLog">Use the System Log</a>
<ol> <ol>
<li><a href="#systemLogWrite">Write log messages in your code</a></li> <li><a href="#systemLogWrite">Write log messages in your code</a></li>
@@ -29,7 +28,7 @@ page.title=Debugging with Android Studio
</ol> </ol>
<h2>See also</h2> <h2>See also</h2>
<ul> <ul>
<li><a href="{@docRoot}sdk/installing/studio-tips.html"> <li><a href="{@docRoot}tools/basics/index.html">
Android Studio Tips and Tricks</a></li> Android Studio Tips and Tricks</a></li>
<li><a href="{@docRoot}tools/debugging/index.html">Debugging</a></li> <li><a href="{@docRoot}tools/debugging/index.html">Debugging</a></li>
<li><a href="{@docRoot}tools/help/monitor.html">Device Monitor</a></li> <li><a href="{@docRoot}tools/help/monitor.html">Device Monitor</a></li>
@@ -114,7 +113,6 @@ debugger to.</li>
alt="" style="vertical-align:bottom;margin:0;height:20px"/>.</li> alt="" style="vertical-align:bottom;margin:0;height:20px"/>.</li>
</ol> </ol>
<h2 id="systemLog">Use the System Log</h2> <h2 id="systemLog">Use the System Log</h2>
<p>The system log shows system messages while you debug your app. These messages include <p>The system log shows system messages while you debug your app. These messages include
@@ -405,4 +403,4 @@ app, and you can also attach them to bug reports that you send to your developme
<li>Interact with your app.</li> <li>Interact with your app.</li>
<li>Click <strong>Stop Recording</strong>.</li> <li>Click <strong>Stop Recording</strong>.</li>
<li>Enter a file name for the recording and click <strong>OK</strong>.</li> <li>Enter a file name for the recording and click <strong>OK</strong>.</li>
</ol> </ol>

View File

@@ -18,7 +18,7 @@ page.title=Debugging
<p>The Android SDK provides most of the tools that you need to debug your applications. You need <p>The Android SDK provides most of the tools that you need to debug your applications. You need
a JDWP-compliant debugger if you want to be able to do things such as step through code, a JDWP-compliant debugger if you want to be able to do things such as step through code,
view variable values, and pause execution of an application. If you are using Eclipse, a view variable values, and pause execution of an application. If you are using Android Studio, a
JDWP-compliant debugger is already included and there is no setup required. If you are using JDWP-compliant debugger is already included and there is no setup required. If you are using
another IDE, you can use the debugger that comes with it and attach the debugger to a special another IDE, you can use the debugger that comes with it and attach the debugger to a special
port so it can communicate with the application VMs on your devices. The main components that port so it can communicate with the application VMs on your devices. The main components that
@@ -27,7 +27,8 @@ page.title=Debugging
<dl> <dl>
<dt><a href="{@docRoot}tools/help/adb.html"><strong>adb</strong></a></dt> <dt><a href="{@docRoot}tools/help/adb.html"><strong>adb</strong></a></dt>
<dd><code>adb</code> acts as a middleman between a device and your development system. It provides various <dd><code>adb</code> acts as a middleman between a device and your development system. It
provides various
device management capabilities, including moving and syncing files to the emulator, running a device management capabilities, including moving and syncing files to the emulator, running a
UNIX shell on the device or emulator, and providing a general means to communicate with UNIX shell on the device or emulator, and providing a general means to communicate with
connected emulators and devices.</dd> connected emulators and devices.</dd>
@@ -42,9 +43,9 @@ page.title=Debugging
<dt><strong><a href="{@docRoot}tools/device.html">Device</a> or <dt><strong><a href="{@docRoot}tools/device.html">Device</a> or
<a href="{@docRoot}tools/devices/index.html">Android Virtual Device</a></strong></dt> <a href="{@docRoot}tools/devices/index.html">Android Virtual Device</a></strong></dt>
<dd>Your application must run in a device or in an AVD so that it can be debugged. An <code>adb</code> device <dd>Your application must run in a device or in an AVD so that it can be debugged. An
daemon runs on the device or emulator and provides a means for the <code>adb</code> host daemon to <code>adb</code> device daemon runs on the device or emulator and provides a means for the
communicate with the device or emulator.</dd> <code>adb</code> host daemon to communicate with the device or emulator.</dd>
<dt><strong>JDWP debugger</strong></dt> <dt><strong>JDWP debugger</strong></dt>
@@ -66,13 +67,13 @@ page.title=Debugging
alt="Debugging workflow" /> alt="Debugging workflow" />
<p class="img-caption><strong>Figure 1. </strong> Debugging Workflow</p> <p class="img-caption><strong>Figure 1. </strong> Debugging Workflow</p>
<p>On your emulator or device, each application runs in its own instance of a Dalvik VM. The <code>adb</code> <p>On your emulator or device, each application runs in its own instance of a Dalvik VM. The
device daemon allows communication with the VMs from an outside party.</p> <code>adb</code> device daemon allows communication with the VMs from an outside party.</p>
<p>On your development machine, the <code>adb</code> host daemon communicates with the <code>adb</code> device daemon and <p>On your development machine, the <code>adb</code> host daemon communicates with the
allows tools such as DDMS to communicate with the device or emulator. The <code>adb</code> host daemon also <code>adb</code> device daemon and allows tools such as DDMS to communicate with the device or emulator.
allows you to access shell commands on the device as well as providing capabilities such as The <code>adb</code> host daemon also allows you to access shell commands on the device as well as
application installation and file transferring.</p> providing capabilities such as application installation and file transferring.</p>
<p>Each application VM on the device or emulator exposes a debugging port that you can attach to <p>Each application VM on the device or emulator exposes a debugging port that you can attach to
via DDMS. DDMS can forward any of these ports to a static debugging port (typically port 8700) by via DDMS. DDMS can forward any of these ports to a static debugging port (typically port 8700) by
@@ -80,10 +81,10 @@ page.title=Debugging
attach to this static debugging port and debug all the applications that are running on the attach to this static debugging port and debug all the applications that are running on the
device or emulator without having to attach to multiple ports.</p> device or emulator without having to attach to multiple ports.</p>
<p>If you are using Eclipse, much of these interconnections are hidden from you. DDMS, <code>adb</code>, and a <p>If you are using Android Studio, much of these interconnections are hidden from you. DDMS,
JDWP debugger are all setup for you and you can access them through the Debug and DDMS <code>adb</code>, and a
perspectives in Eclipse. If you are developing in a non-Eclipse environment, you have to invoke JDWP debugger are all setup for you and you can access them through the Debug and DDMS view. If
these tools manually.</p> you are developing with another IDE environment, you may have to invoke these tools manually.</p>
<h2 id="addltools">Additional Debugging Tools</h2> <h2 id="addltools">Additional Debugging Tools</h2>
@@ -135,8 +136,6 @@ Debugging with the Dev Tools App</a>.
<a href="{@docRoot}tools/help/adb.html#dumpsys">dumpsys and <a href="{@docRoot}tools/help/adb.html#dumpsys">dumpsys and
dumpstate</a> on the adb topic page.</dd> dumpstate</a> on the adb topic page.</dd>
<dt><strong>Get wireless connectivity information</strong></dt> <dt><strong>Get wireless connectivity information</strong></dt>
<dd>You can get information about wireless connectivity using DDMS. <dd>You can get information about wireless connectivity using DDMS.
From the <strong>Device</strong> menu, select <strong>Dump From the <strong>Device</strong> menu, select <strong>Dump