Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Cannot Debug on Android Device

Discussion in 'Editor & General Support' started by tehb0x, May 29, 2017.

  1. tehb0x

    tehb0x

    Joined:
    Feb 2, 2014
    Posts:
    7
    Hi,

    I have an Android specific problem I could easily solve with breakpoints but I cannot get Visual Studio 2017/2015 and Monodevelop to find my phone and attach the debugger.
    I followed this guide and connected my phone via Wifi to the adb:

    https://docs.unity3d.com/Manual/AttachingMonoDevelopDebuggerToAnAndroidDevice.html

    It works, I can find the device under adb devices and Unity finds it too and moves the apk on it.
    But in VS when I go to Attach Unity Debugger I can only see the Editor and not the Android Player?
    Same in Monodevelop. App is running, I'm also waiting since it says it may not appear immediately, but it never shows up. I reinstalled both tools, Android SDK and the ADB driver but I cannot get it to work!
    After trying everything I could think of in the past 2 days I'm now out of options, does anyone has an idea how to fix this issue?

    Phone is a Samsung S7 on Android 7.0 with the Samsung USB driver for phones on the PC (Windows 10). Unity version is 5.6.1f1

    Thanks for your time
     
    Last edited: May 29, 2017
  2. jules_fpvr

    jules_fpvr

    Joined:
    Jan 8, 2016
    Posts:
    35
    I'm having exactly the same problem. Still trying to figure out a solution.

    Running Unity 2017.3.0p1 and Visual Studio 2017. Samsung process never appears in Attach Unity Debugger list.

    I can see the device in adb devices and the app is built with development/script debugging.
     
  3. jules_fpvr

    jules_fpvr

    Joined:
    Jan 8, 2016
    Posts:
    35
    Turns out my problem on affects VS2017, works fine on MonoDevelop
     
  4. Sprarage

    Sprarage

    Joined:
    Aug 1, 2013
    Posts:
    7
    Same problem! Using Unity 2017.3.1p1 and MonoDevelop 5.9.6., on Windows 10.0.16299.
    Connecting via adb to Samsung Galaxy S8+.
    Waited for process to appear in Attach popup window, no luck.
    I manually allowed MonoDevelop to get through my Windows Defender Firewall, also no luck.
    Any way to get under the hood in MonoDevelop or elsewhere to see what's happening with the signal?
     
  5. jules_fpvr

    jules_fpvr

    Joined:
    Jan 8, 2016
    Posts:
    35
    Make sure both phone and pc are attached to same wifi hotspot, USB cable is plugged in, adb tcpip 5555 has located device. If it still doesn't come up, make sure wifi on pc is in private mode and if that doesn't work try disabling firewall temporarily to see if it fixes it.

    J
     
  6. JorgeQuevedoC

    JorgeQuevedoC

    Joined:
    Apr 30, 2014
    Posts:
    5
    I've done all that. I've noticed Profiler is working, so that would mean Wifi and Firewall ar ok. But on Monodevelop the android player just doesn't get listed. I made sure Script Debugging is enabled when building and yet nothing.
     
  7. rnnbl4133

    rnnbl4133

    Joined:
    Jan 3, 2018
    Posts:
    3
    Monodevelop only knows unity player to debug, for devices it just aint' working. Please tell me otherwise.
     
unityunity