Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I debug a Unity Container "Resolve"?

I'm using the MS Unity container to do dependency injection, but a "Resolve" is returning unexpected results.

Is there an way I can debug this resolution? It would be great if I could view what Types/Instances are registered in the container, but I can't see where this is stored when using QuickWatch. It would also be useful if I could get the container to output some debug Traces.

Any suggestions?

like image 988
willem Avatar asked Oct 30 '09 09:10

willem


1 Answers

The source code for the Unity framework is available for download at http://unity.codeplex.com. If you include it in your solution and reference the Unity projects instead of the compiled DLLs in your projects, you will be able to debug through the Unity source code.

like image 151
Konamiman Avatar answered Dec 12 '22 11:12

Konamiman