Search code examples
c#visual-studiounity-game-enginemonodevelopunityvs

Visual Studio not connecting to Unity3D iPhone


I'm running UnityVS through Visual Studio, I build the game on OSX Unity and try to attach Visual Studio on Windows to it via 'Attach to Process'.

Nothing happens when I do t his, no output and the debugger does not connect. I can connect to any other player this way and this used to work in previous versions of Unity.

As another interesting tidbit: the iPhonePlayer does not appear in MonoDevelop at all, on Windows Monodevelop sees the iPhonePlayer but trying to connect to it yields a 'Could not connect to the debugger.' error.

Could it have something to do with using the IL2CPP compiler? In previous versions I used Mono but in the latest version of Unity that stopped working (ARMV7 compiler duplicate symbols etc) so I was forced to switch to IL2CPP...

I'm running latest versions of Unity on both platforms.


Solution

  • The IL2CPP scripting backend in Unity does not support managed code debugging, so this will not work.

    You can debug the generated C++ code with Xcode though, here is a place to start:

    http://blogs.unity3d.com/2015/05/20/il2cpp-internals-debugging-tips-for-generated-code/