It is common knowledge that I work on mobile games and of course Android is one of the platforms we develop on. And from time to time we need to break point our code whilst it is running on device. Today however, I couldn’t remember how you do it. So I headed over to the Unity Manual, but there was lack of information how to do this in Visual Studio. It tells you how to easily attach to the MonoDevelop debugger, but not the Visual Studio one. So we went looking for a way to do it. Unity Answers post does tell you how to do it, but it isn’t particularly well worded and also starts of with “I just went back to MonoDevelop” which quickly makes you stop reading the rest of his/her answer.
This is how you do it.
First follow the steps on this page of the manual:
Then in Visual Studio go to the following menu:
In the next Window you should see “Android Player” (you don’t see it in the next image because I am not currently working in an Android project, but hopefully the giant arrow will help).
If you have an IP of a device you can also input it here. This also works for some of the other platforms including some of the consoles.