Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug an already running app without restarting it

Is it possible to connect Eclipse to an already running app without restarting the app?

like image 388
Johann Avatar asked Dec 08 '22 23:12

Johann


2 Answers

Eclipse

1- Make sure you have the app's project code in Eclipse (you can't debug an app if you don't have its code).

2- Open DDMS perspective (Window > Open Perspective > Other > DDMS)

3- In the Devices tab select your device and expand if needed.

4- Select your application (you'll see the package name)

5- Click on the small bug icon next to the Devices tab to attach the debugger.


Android Studio

Click on the "Attach debugger" icon. It's the one on the right in the picture below.

Android Studio icons

Alternatively you can access this feature from Run > Attach debugger to Android process.

You will be presented with a dialog displaying connected devices and the running apps you can debug.

Select a process and click OK.

like image 188
Benito Bertoli Avatar answered Dec 31 '22 13:12

Benito Bertoli


Yes it is possible to Debug an already running app without restarting it.

Steps

Just run your app, Go to devices select you device and then your already running app and then select debug option on the top of device window. It will start debugging your app.

like image 24
LuminiousAndroid Avatar answered Dec 31 '22 12:12

LuminiousAndroid