- Home /
Hitting Mono Breakpoint Crashes Unity
I'm having an issue with debugging my Unity project where if I hit a breakpoint in MonoDevelop, Unity crashes with the following error:
Runtime Error!
This application has requested the Runtime to terminate it in an unusual way.
It also doesn't matter where the breakpoint is, Unity will crash if a breakpoint is hit in any script file. The game runs fine as long as a breakpoint is not hit.
Any help or advice would be greatly appreciated. Let me know if there are other details that I can provide to help diagnose my issue.
Unity v3.4.0f5
MonoDevelop v2.4.2
Getting this frequently as well - did you get further with it?
This is a documented problem in Unity v3.4 They stabilized debugging greatly with breakpoints in Unity 3.5.
@Ant are you having trouble with v3.5 or v3.4?
@dkNinja, I'm using Unity v 3.5.1 (I had the same issues with Unity 3.5) and $$anonymous$$onodevelop 2.8.2 Generally (but not always) it'll hit a breakpoint, the above error will occur it'll crash and $$anonymous$$onodevelop will close, leaving Unity open and unresponsive (and I have to start the task maanger to quit).
It doesn't seem to be a particularly consistent either - I can run the game with the same breakpoint - sometimes it will crash as described above, but sometimes it won't.
Any further updates on this yet? It's incredibly frustrating and destroying productivity....
One interesting thing I've noticed - when you hit a breakpoint, it shows it within monodevelop as usual, but now, it seems to reload the solution, and usually leaves you looking at a random script file which doesn't contain the breakpoint. You can navigate back to it and step through the code (when it doesn't crash, which in my case is around 50% of the time on a number of projects).
Answer by casperas14 · May 02, 2012 at 03:39 PM
@Ant, since updating to Unity 3.5.0 and MonoDevelop 2.8.2 I really haven't seen this issue. I also don't debug in MonoDevelop quite as much, because after coming across this issue I started to rely more on Debug.Log rather than breakpoints. Of course, sometimes using breakpoints and stepping through code is just a lot easier and logging just won't cut it. In these instances I've found MonoDevelop 2.8.2 to do the trick.
On a side note, I have found that inspecting certain object types (especially generic collections) in MonoDevelop 2.8.2 to be a bit clunky and unhelpful.