I am running Unity 2018.2 and when building my Hololens project with IL2CPP, in Visual Studio 2017 I can no longer see any output when Debug.Log is called from my project's C# scripts.
I believe my question is related to this other question What is the best way to debug IL2CPP code?.
I have followed these instructions https://docs.unity3d.com/2018.2/Documentation/Manual/ManagedCodeDebugging.html (Visual Studio (Windows)), the recommended tool installation for Hololens (https://learn.microsoft.com/en-us/windows/mixed-reality/install-the-tools) and the Hololens instructions on how to build a project in Unity (https://learn.microsoft.com/en-us/windows/mixed-reality/holograms-100).
Is there anything else that should be enabled to see the debug.log outputs when building with IL2CPP?
I also had this issue using Unity 2019.1. and Visual Studio 2019. So in case anybody has troubles with that, I managed to get my desired debugging behavior by attaching a managed Unity Debugger to the App running on the HoloLens as described in this post. Then, I changed my
Debug.Log
statements toSystem.Diagnostics.Debug.WriteLine
. Basically, what you have to do isDevelopment Build
,Script Debugging
andWait for managed debugger
options.Debug -> Attach Unity Debugger
.You can then use Breakpoints, see outputs of
System.Diagnostics.Debug.WriteLine
etc.