Is there a way to see a log of what is going on inside Resolve<T>()?

Sep 12, 2011 at 11:36 AM

Hi everyone!

I'm now converting my project from homemade container-like structure, to Unity. I'm at the stage where it is building, but have some configuration problems. After last change project began failing without exception(simply system crash message after a couple of seconds lag). My experience tells me, that this is because of stack overflow. I think I heard somewhere that there is a way to enable logging of unity resolution process. So I'll be able to see where it gets stuck, but I can`t find this info anymore.

Sep 13, 2011 at 8:38 AM

Hi,

As far as I know Unity doesn't have a functionality like that. You can however write a code (something like from this thread) that will calculate the time lapsed for every call to resolve. Hope this helps.

 

Noel Angelo Bolasoc
Avanade Software
Avanade, Inc.
Contact Us

 

 

Sep 13, 2011 at 8:51 AM

The problem is not in the performance. Whole application under debug just crashes, Visual Studio can`t even catch any exception. I think this is because stack overflow inside container. And I need no know which type causes circular reference.

Sep 13, 2011 at 9:11 AM
Edited Sep 13, 2011 at 9:11 AM

Is there any exceptions logged on the Event Viewer after the crash?

 

Noel Angelo Bolasoc
Avanade Software
Avanade, Inc.
Contact Us

Sep 13, 2011 at 12:00 PM

Just a generic exception.

I managed to find circular dependency manually.