3

My problems is:

  • Profiler shows nothing;
  • Console shows nothing;
  • Debugging isn't possible;

And in the same time:

  • debugging works well on "Run" in editor
  • I'm able to install app from Unity ("Debug and run")

What I have done:

  • On the phone I have enabled Debugging(checked checkboxes: "stay awake", "USB debugging", "Install via USB", "USB Debugging(Security settings)")
  • ADB usb driver is installed
  • "Revoke USB Debugging Access" also tried to press.
  • Computer and phone restarted few times.
  • Unity build settings is: Development build; Autoconnect profiling; scripts debugging; is enabled
  • USB configured to PTP connection on the phone. [But MTP I have also tried]
  • ADB can see the phone without any issues:

    C:\Users\UKS2\AppData\Local\Android\Sdk\platform-tools> adb devices List of devices attached a616d3d10204 device


Additional information:

  • Result of "adb logcat -s Unity" from cmd shows full log from the phone in realtime;
  • Visual Studio: Debug-> Attach Unity Debugger - shows only local PC, but not the phone
  • In case of connetion via WiFi (but not USB cable) and manually configured IP adress enter image description here there is possible to look at device console log and to see profiler results. BUT it's not possible to debug from the phone.

What did I miss?

I think that Unity for some reason trying to connect to the phone by some incorrect way/adress/port after app install. But how to fix this? And why it's have no problems in install app process in this case?

2 Answers 2

2

It's sounds like a joke. Problem was in Firewall.

Few days with this problem I have think that Firewall is disabled on my computer.

But it wasn't.

0
0

This works for iPhone too!

Would like to add to the answer by Andrew, because it I couldn't realise the proper way to disable it entirely. Disable the firewall like this:

On Windows 10: Windows Defender Firewall with Advanced Security --> Overview --> Windows Defender Firewall Properties:

enter image description here

In there I had to set Firewall State to 'off' for both Domain Profile, Private Profile and Public Profile tabs. (perhaps not all were needed, but was short on time, so didn't experiment). Disabling all can expose your pc, making it vulnerable.

Also, double check that the wifi is enabled on the actual device (phone) and that you are connected to the same router as your computer. The USB wire between to PC wasn't enough!

Perhaps might be worth to launch your console in Administrator mode (I always do by default)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.