Home » Android » Unity debugging for android devices

Unity debugging for android devices

Posted by: admin May 14, 2020 Leave a comment


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:

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!

How to&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. 🙂


I also got the problem today.

Your front steps are correct. Problem is “Attach to Process”.

After app run on android device, close unity but keep monodevelop, then click the run button(or menu Run | Attach to Process) of monodevelop. Now u can see device list in the dialog.

It works for me. I found the solution from the thread u mentioned

#15 manuelpeirone’s answer