Early exit in OnGui()

Is there a way to trace if a function exits early but doesn’t throw an error in the console window?

I have a function that gets called if I put it at the top of my OnGui() function but not if I shift it to the bottom, this suggests to me that somewhere in between it is bailing out, but doing so silently without throwing an error.
Looking through the code I can’t see anything obviously wrong, plus the gui all gets correctly displayed.

Sure. Flood your OnGUI function with Debug.Log calls and see which is the last to be executed by examining the log. Then you’ll get where the function bails which will allow you to investigate further.

Ha, ha, yes that is currently my best option, just wondering if there was anything more elegant…

makes me wonder where else it might happen and I’d never realy know. Unless I seed the entire application with random debug calls.

Well if most of your code is skipped without you noticing in the build product then perhaps there was no need for it in the first place, eh? :wink:

A full debugger for the mono project is a popular request. They’re on it.

That’s what is so confusing if any of the code was skipped it should have shown up with some missing gui and other broken functionality but the only thing it effected was my call to a shortcuts function.
I need to do some more digging.