About IL2CPP Managed Debugger

Can you explain it better? Does it mean that we will be able to build and install an apk or ipa and attach Visual Studio to that process in the device or I'm completely wrong and it does nothing to do with this?

Unity Technologies

Eventually yes, this is correct. For many Unity versions, it has been possible to debug C# script code with Visual Studio when the Mono scripting backend is used. Starting in 2018.1, that will work with the IL2CP scripting backend as well, but only for standalone players on Windows and macOS.

In 2018.2, we're planning to ship support for Android, iOS, and all other platforms where IL2CPP works. Then you will be able to install an apk created in Unity with IL2CPP and debug the C# code with Visual Studio.

Unity Technologies

It is not currently possible on WebGL. The managed debugger requires socket communication between the Unity player and the code editor (e.g. Visual Studio). It also requires multiple threads in the player. We could probably use WebSockets to handle the socket communication, but without threads in WebGL, we're stuck.

I'm assuming this is supposed to work with all IDEs that can debug Mono, not only Visual Studio? Ie. Rider, VS Code, VS for Mac* etc?

Also, is the setup supposed to be:
- make a build with IL2CPP for Windows Standalone with debugging turned on
- run it
- attach the debugger from your code editor
- break

Or are there more involved steps to take?

* It seems more and more obvious that the people who's in charge of branding at Microsoft runs on a unique mix of insanity and hate for their users. "I use Visual Studio. No, not that Visual Studio, the other one. No, not that one either, the third one".

Unity Technologies

I'm assuming this is supposed to work with all IDEs that can debug Mono, not only Visual Studio? Ie. Rider, VS Code, VS for Mac* etc?

Also, is the setup supposed to be:
- make a build with IL2CPP for Windows Standalone with debugging turned on
- run it
- attach the debugger from your code editor
- break

Or are there more involved steps to take?

* It seems more and more obvious that the people who's in charge of branding at Microsoft runs on a unique mix of insanity and hate for their users. "I use Visual Studio. No, not that Visual Studio, the other one. No, not that one either, the third one".

Click to expand...

Yes, it should work for all code editors that work with Unity. Also, your steps are correct. The behavior should be the same as the Mono scripting backend in all respects.

I am using Unity 2018.2 and can't figure out how to debug managed code.
I have built my project with "Script debugging" enabled, my iOS device is on the same network as my Mac (pinging works) but the player does not appear in my IDE (Jetbrains Rider)

Unity Technologies

I am using Unity 2018.2 and can't figure out how to debug managed code.
I have built my project with "Script debugging" enabled, my iOS device is on the same network as my Mac (pinging works) but the player does not appear in my IDE (Jetbrains Rider)

Any documentation / how to somewhere?

Click to expand...

Unfortunately we don't have great (or much) debugger documentation. I'm hoping to fix that soon.

In the meantime, it sounds like you are doing things correctly. You might be running into a firewall issue. The debugger protocol uses TCP at a pretty high port number, so even if a ping succeeds, the connection to the player might not work. Here are a few things to try:

Build and Mac standalone player for both IL2CPP and Mono, make sure you can debug these.

Try to use the Unity profiler to profile the iOS player on your device - the debugger discovery protocol uses the same TCP connection as the profiler.

Try a different IDE. You can use VS for Mac or Visual Studio from a Windows machine.

Unity Technologies

What version of Unity are you using? The Il2CPP debugging was enabled for standalone players only on 2018.1...other players like IOS were added in 2018.2. If you are seeing trouble in 2018.2, Try the latest Rider..if there are still issues please file a bug with as much detail as you can so we can look into this.

What version of Unity are you using? The Il2CPP debugging was enabled for standalone players only on 2018.1...other players like IOS were added in 2018.2. If you are seeing trouble in 2018.2, Try the latest Rider..if there are still issues please file a bug with as much detail as you can so we can look into this.

If you are using a mobile phone as you iOS device, make sure that it only has one active network connection. Often, a mobile phone will have both a data connection and a Wifi connection. Remote debugging is done via a TCP socket, so if you try to connect to the data connection, that probably won't work.

You can put the phone in airplane mode and enable Wifi. That should get it down to one network connection, and it may correct the issue you see.

Oops...

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.