2.9.2 Downloading and debugging an Android application in DS-5
This tutorial describes how to create a debug configuration, download the application on to your target, and connect to your target using DS-5.
- One of the sample applications provided with Android NDK is
hello-neon. You must have already built the
application and have access to the source location.
- Your target must already be up and running. If you are using an Android
Virtual Device (AVD), your device emulator should be configured with the
appropriate API levels and CPU settings. It must also be up and running for
to connect to it.
- The Android SDK source folder must be available under your operating system
PATH environment variable. If not, add the ...\android-sdk\platform-tools folder to your
PATH environment variable.
Start DS-5, and in the
main menu, select .
Select DS-5 Debugger from the
configuration tree and click
New to create a new debug configuration.
In the Debug Configurations dialog, under the
Give the debug configuration a Name. For
Under Select target, browse and select .
Under Connections, select your target. For
Figure 2-12 Debug Configuration dialog-Connection tab-Download and debug an Android application
In the Files tab of the Debug
application sources are stored. This automatically populates other
select the folder where the
Figure 2-13 Debug Configuration dialog - Files tab - Select Project directory
In the Debugger tab of the Debug
Under Run control, select Connect
Under Paths, browse and select the
hello-neon source directory.
Figure 2-14 Debug Configuration dialog - Debugger Tab - Connect only (Android)
Click on Debug to
connect to the target.
Debugging requires the DS-5 Debug
perspective. If the Confirm Perspective Switch dialog box
opens, click Yes to switch
To debug the application, set breakpoints, run, and step as required.
NoteIf the application exits before NDK can attach gdbserver to the native library then you might need to add a delay before launching the Java native libraries.