Debugging OpenSoruce UISystem dlls that I build using Xamarin Studio

So unity released the source code for the UISystem, so people can customize it. This is what I want to do.
Here’s the original announcement
And here is the bitbucket readme area which has some simple instructions
And here is the unity help about it

Those all talk about how to set up everything and get dlls built, which I can do. However, they leave the actual debugging as an exercise to the user. I don’t have visual studio, so I’m interested in using xamarin studio or monodevelop to enhance the uisystem dlls.

So what is the process to do this? Is it this?:

  • Build in debug mode
  • Copy new dlls into unity installation
  • Restart unity
  • attach debugger to unity
  • run the game preview

Or are there other things involved?

That’s pretty much it.
You should also copy the debug symbols (.mdb files) to get it working.
In case you’re on Windows, i think you’ll need to convert the .pdb files into mdb files before.

1 Like

As Liortal was saying you will need the correct files (.dll.mdb or .pdb) which are automatically exported on a successful build

    <Copy Condition="'$(Configuration)' == 'Debug' And '$(OS)' == 'Unix'" SourceFiles="$(TargetDir)$(TargetName).dll.mdb" DestinationFiles="$(ProjectDir)..\Output\Standalone\$(TargetName).dll.mdb" />
    <Copy Condition="'$(Configuration)' == 'Debug' And '$(OS)' != 'Unix'" SourceFiles="$(TargetDir)$(TargetName).pdb" DestinationFiles="$(ProjectDir)..\Output\Standalone\$(TargetName).pdb" />

Code from MSBuild for UnityEngine.UI.assembly

Just drag the whole folder output folder to the correct location or comment the build commands to make it automatic. Doing it automatically will save a ton of time.

I am 70% sure you can’t debug with Xamarin so switch over to monodevelop. It should just be a matter of connecting the debugger like you would for a normal Unity project.

2 Likes