Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity debugging for android devices

I'm having a hard time getting breakpoint debugging working for unity with and android device. I've tried with both visual studio code and monodevelop.

In android:

I have successfully done all the steps outlined here for getting android connected over wifi in tcpip mode: https://docs.unity3d.com/Manual/AttachingMonoDevelopDebuggerToAnAndroidDevice.html enter image description here

In unity

In build settings I have "development build" and "script debugging" checked. When I build and run, it programs my device just fine over wifi. Android build settings

For monodevelop

I try debugging with "attach to process" but it only finds the Unity Editor. enter image description here Lots of people have the same problem:https://forum.unity3d.com/threads/attaching-monodevelop-debugger-to-an-android-device.245814/ Down at the bottom, people are figuring out that multicast settings were the issue. I have a linksys router, and I've ensured that security->filter multicast is unchecked. Is there anything else I have to do here to get multicast to work?

Since monodevelop wasn't working, I tried with vscode

For VS code

I added the plugin to an empty project as described here: https://code.visualstudio.com/Docs/runtimes/unity

When I try debugging with vscode I get the error "Could not find target name 'Android Player'. Is it running?" enter image description here

I also wanted to see which processes I could select but when I try running "Unity Attach Debugger" from the command palette, I get this error: "command 'attach.attachToDebugger' not found" enter image description here

Any help would be much appreciated!

like image 894
chanban Avatar asked Jan 16 '17 21:01

chanban


1 Answers

For what it's worth, I've encountered the Could not find target name 'Android Player'. Is it running? message in Visual Studio Code when my laptop and the Android device I'm trying to debug were (accidentally) not connected to the same wifi network.

Connecting them to the same network got things working again. So that's an easy thing to check. :)

like image 192
brookinc Avatar answered Sep 23 '22 03:09

brookinc