I can't attach Android Studio's debugger to my debuggable application process. Anyone else had this issue? Basically I can't get my app listed in Choose Process
dialog.
I'm selecting Attach debugger to Android process
:
And then, here's how Process selection
dialog from Android Studio looks like:
Any ideas why my app is not shown in the Choose Process
list?
Although, DDMS
sees my app in Devices | logcat
list:
Android Monitor
also sees the app in Devices
list:
I've tried these actions:
- Restarting
MacBook
- Restarting devices: tried with
Samsung Galaxy Note II N7100
(4.3) andSamsung Galaxy S4
(4.4.2) - Reenabling
Settings->Developer Options
on the devices - Reenabling
Settings->Developer Options->USB debugging
on the devices - Restarting
adb
by runningadb kill-server
andadb start-server
- Reconnecting device from macbook and/or plugging to another USB port
- Launching Genymotion virtual device on macbook
restarting in TCP mode port: 5555
by runningadb tcpip 5555
and then connecting to it withadb connect 192.168.1.87
Waiting more
&Restart
when got this error sayingADB not responding. You can wait more, or kill "adb" process manually and click 'Restart'
Errors in ADB:
ddms: '$ANDROID_HOME/platform-tools/adb,start-server' failed -- run manually if necessary
Error screenshot
Update:
What I've noticed is that device appears multiple times in the Android DDMS
->Devices | logcat
list. If I choose 1st device from the list, it shows, there's No debuggable applications
, but I select last device (4th in the screenshot) I see my debuggable application. See screenshots: 1st and 4th. Although, even there's only 1 device in the list and showing debuggable device and application, process still does not appear in the Choose Process
dialog.
same did happen with me, the root cause for this problem was interruption(network disconnection or force close) while updating any of the plugin(in my case kotlin) Solution For mac: goto prefrences(shortkey: cmd + ,)
For windows:(short key: **ctrl + alt + s) or through menu
then in left panel look for Languages and Frameworks -> kotlin/java updaes and upon selecting it. In right pan there will be option(button) to update the plugin. update the plugin.
Exit and Restart the android studio. now you will be able to debug with all list of available processes running.
I solved this way
a. Closed Android Studio
b. Did
adb kill-server
from a terminal. Also check the adb process in also killed from the Running processes window in PCc. Started Android Studio
d. Android Studio tried to initialize adb again and back to work.
This is what worked for me and its simple, go to Tools->Android->Enable ADB Integration, click on this and mark it selected if not selected this will allow your genymotion instance to connect to ADB but if this doesnt work then, if above mentioned setting is selected then mark unselected and wait till ADB is refreshed( few seconds) then again go to same setting and click on it to mark is selected, this will restart ADB and connect it. This works perfect for me each time i see this issue.