Search code examples
unity-game-enginevisual-c++augmented-realityhololenshololens-emulator

What is the best way to debug IL2CPP code?


With Unity doing away with the .NET scripting backend we have been using the IL2CPP scripting backend so we can get used to it. We have having a very hard time debugging c++ code as the code files created do not use the same method names from the .NET code. More specifically we are developing for the Hololens emulator.

I heard that Unity is putting out some sort of debugger that will let you debug managed .NET c# code at runtime even when you use the IL2CPP scripting backend, does anyone know if that is true and, if so, when that will be coming out. Is anyone doing anything to make this debugging any easier that we may not be thinking of?


Solution

  • Starting in Unity 2018.2, Unity supports debugging of managed code in C# with the IL2CPP scripting backend. The debugging experience is the same as with the Mono scripting backend. On Windows, you will need Visual Studio with the Visual Studio Tools for Unity extension installed.

    You can see the managed debugger documentation here: https://docs.unity3d.com/2018.2/Documentation/Manual/ManagedCodeDebugging.html