Reputation: 7017
Is it possible, while debugging a Silverlight app, to view all current references to an object?
I know that WPF developers have the ability to use the SOS.dll, but that cannot be loaded in the VS2008 IDE while debugging a Silverlight app. I've tried it, but the load command gives me the error:
.load C:\Program Files\Microsoft Silverlight\3.0.40818.0\sos.dll
SOS not available while Managed only debugging. To load SOS, enable unmanaged debugging in your project properties.
Unfortunately, there is no way to enable unmanaged debugging for a Silverlight app through the VS2008 IDE. I've also tried to the 'Attach To' the process, but still, no dice.
Upvotes: 1
Views: 632
Reputation: 3617
I'm not sure if its possible from VS2008, but if you download and run WinDbg as part of the debugging tools for windows and you can attach on to a process hosting a silverlight plugin.
Once you attach you can run the following to use SOS:
.loadby sos coreclr
There are some examples out there for tracking down managed memory leaks, etc:
http://blog.ningzhang.org/2008/12/silverlight-debugging-with-windbg-and.html
http://weblogs.asp.net/pglavich/archive/2008/12/03/debugging-silverlight-apps-using-windbg.aspx
Upvotes: 1