Monodevelop - set breakpoint inside of UnityEngine.dll's class

Hi,

I’m getting these “some objects were not cleaned up”, when I enter/exit play mode, and, in spite of knowing that I must be creating a GameObject somewhere on OnDestroy(), I can’t pin it down just by looking at the code.

The proper way to debug this would be to know (via a breakpoint) when a GameObject is created, so I could inspect the stacktrace and find the root of the problem.

I can see, through the assembly browser, the GameObject’s “visible” code but I’m not able to set a breakpoint there. Is there any way to do so in MonoDevelop?

Probably not, but you can do a search of the entire project with ctrl+shift+f to find your “OnDestroy” and “OnDisable” functions and see if you’ve done any creation there.

Another note: OnApplicationQuit() is a function that gets called BEFORE OnDestroy() and OnDisable() when your game is closing. You can use that to mark an object so it knows not to create new objects when the game is closing.

Thank you,

I’ve already searched but I just can’t find the source of the problem. Bumping this to confirm if it is indeed possible or not to set a breakpoint inside an internal dll in monodevelop