Besides debugging an Android application by initiating a debugging session, you can apply the debugger to an already running application. You can do it in two ways:
- Attaching the Debugger to a Running Process
- Starting a run configuration without deploying a package and launching an activity
- On the toolbar, click the Attach debugger to Android process button .
- In the Choose Process dialog box that opens, select the relevant process from the list. The dialog box shows all the currently active processes grouped by devices they are running on.
You can launch a debugging session according to a debug configuration with neither a package to deploy nor an activity to launch. Debugging will be targeted against an already running activity.
For general information about run/debug configurations, see Creating and Editing Run/Debug Configurations.
- To start creating an Android run configuration, choose Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Control Alt RShift Alt F10Control Alt R and choose Edit Configuration from the pop-up menu. on the main menu. Alternatively press
- Click the Add New Configuration button on the toolbar and choose Android from the pop-up list.
- On the Run/Debug Configuration: Android page that opens, specify the configuration name and choose the module to apply the current configuration to.
- Choose Do not deploy anything in the Packages area to suppress uploading data to the device and then choose Do not launch activity in the Activity area.
- In the Target Device area, specify the device to launch the application on or appoint the method for choosing this device. See Creating an Android Run/Debug Configuration for more information.