- Home /
MonoDevelop Debugging of Android Player: How to Attach to Process of Android Device/Application
Unity v4.1.2 Pro with Android support.
Android SDK v4.2.2 Jelly Bean.
MonoDevelop v2.8.2 (Unity)
Can successfully build, run, debug Unity Editor
Can successfully connect to my various Android Devices ( GalaxyNexus, Nexus7, Nexus10 ) via USB debugging & ADB.
Can successfully connect and run Unity Profiling via USB debugging & ADB.
Can successfully Build & Run a test.apk on each device.
CANNOT attach to the process in MonoDevelop to debug. Starting MonoDevelop and opening "Attach to Process" dialog, shows no "Android*" device/application process to attach to. Only see "Unity Editor".
Note*, can successfully use Unity Remote as well via USB Debugging & ADB.
Is it only possible to debug Android applications via WiFi?
Any insight would be much appreciated.
Same problem here. $$anonymous$$y Nexus 5 is not visible at all for $$anonymous$$onoDevelop, nor in USB mode neither in WiFi, despite adb see it without problem in both cases.
However, $$anonymous$$onoDevelop does see an emulator running, but when you try to attach such device $$anonymous$$onoDevelop says that it couldn't attach it after a long pause.
Did you manage to solve it?
Answer by kc_wired · Jun 19, 2013 at 11:29 PM
I contacted Unity Technical Support. Apparently, Unity Script Debugging on Android with MonoDevelop is only supported via WiFi. It is not possible via USB Cable.
Open TCPIP port for ADB WiFi serving
>adb tcpip 55555 2. Connect to Android device via WiFi
>adb connect 3. Android device should then appear: - Unity Profiler -> Active Profiler as AndroidPlayer - MonoDevelop -> Attach to Process as AndroidPlayer
I connected first my android (by USB) device then
adb tcpip 8989
adb connect 192.168.1.67:8989
But even I get the message "restarting in TCP mode port: 8989" from adb I can't connect unable to connect to 192.168.1.67:8989
, a telnet and a scan port on the IP of my device doesn't show that 8989 is open.
I can ping ping 192.168.1.67
and get a pong.
Android version 2.3.7 not rooted device.
Profiler is only available for Pro version, and anyway it shouldn't be needed for step by step debugging.
This doesn't work for me. With an actual device, the device is not shown at all in $$anonymous$$ono's debugger targets. With an emulator the device is shown, but it will end saying it couldn't connect to the device after a long pause. So far I haven't figure out what's wrong, despite I have wasted a whole afternoon trying to make this work.
Try 5555 ins$$anonymous$$d of 55555
Unplug your USB cable and disable other data on device.
Answer by Mimoza Lladrovci · Feb 16, 2016 at 04:34 PM
You have to allow MonoDevelop to communicate through Windows Firewall. Go to Control Panel\System and Security\Windows Firewall\Allowed Programs and change the settings for MonoDevelop. The device will appear right away if the rest of the steps are completed successfully.