Debug IL2CPP Android build on device

Hi, I am trying to debug a random soft lock on Android device (Pixel 2) when building with the latest Unity (both 2019.1.4f1 and 2019.1.7f1) and IL2CPP.

The issue I am seeing is Unity stops processing Update functions altogether and I get no useful information from the logcat (exception or other) so I’d like to run the project through AndroidStudio and try setting some breakpoints.

I have the project exported from Unity and I can open it in Android Studio, however, I am unable to find any of the symbols for the C# scripts to set breakpoints into… Is there any way to set a breakpoint in a script function (C#) from within Android Studio when using IL2CPP? How do I find the symbol corresponding to the function I want?

Thanks.

You cannot debug C# code from Unity with Android Studio. You can debug it with Visual Studio or JetBrains Rider though. The debugging experience for IL2CPP is the same as for Mono in Unity.

See this page in the Unity manual for details: Unity - Manual: Debug C# code in Unity