Debugging C# code through Unity.

Options
andersonh
edited July 2012 in DotNet
I was wondering if there is any debugging functionality within Unity I can use to debug my C# code that is embedded within the Unity world.

I tried placing breakpoints within my code through monodevelop-Unity, but once I run the code via "Play" in unity, it runs through the break points as if they weren't there.
Hoping there is a debug functionality to do a line by line step through of what runs within this project. Reading spaghetti code without any way to trace where things begin, and how they got there is not the way to go.

Thanks

Comments

  • In monodevelop, from the Run menu, select attach to process, and select your instance of Unity to attach to.
  • Tobias
    Options
    Please keep in mind: A break will pause all threads and this times your client out (from the server's viewpoint).
    Try to use debug messages and or break only when some condition is true (if that's possible).