Can't connect VS Community to Editor for debugging

Hello, community!

I’m desperately trying to connect my MS Visual Studio 7.3.2 to Unity 3D 2018.1.2f1 Editor for debugging purposes.

What I’ve found here is that I just need to hit the Play button and it will connect.

However, what I actualy get is that VS tries to build the project and fails with a bunch of errors of this kind:

CSC : error CS2001: Source file '/Users/bestprogrammer/Documents/Test Project/Packages/com.unity.package-manager-ui/Editor/Sources/Services/Upm/UpmBaseOperation.cs' could not be found.

And it does not connect. Inb4 Unity tools are missing in Visual Studio: I’ve checked it and double-checked. And there is that Debug->Unity Editor next to the Play Button, so I assume Visual Studio is aware that I want to connect to the editor.

So, does anybody know how it works these days?

Updating to Unity 3D 2018.1.4f1 solved the problem. Maybe the Visual Studio was broken.

Struggled with this for two days.
Right now it works, but i don’t know if any of this helped, but here is what i did:

  1. Restart computer.

  2. delete App from phone

  3. Attach phone via USB

  4. Build the App in Unity to phone (in the PlayerSettings I set C++ Compiler Configuration to Debug, but I don’t think it’s neccessary)

  5. in the shell: adb tcpip 5555 (that’s it, no connect to ip or anything)

  6. Now I saw my Device in Visual Studio and could connect

hope it helps