Your description is a bit confusing, since there are three parts to be considered:
- "a running 32-bit application that loads .NET code"
- "opens Silverlight"
- "calls WebBrowser unmanaged ActiveX control"
Regarding 1, running a .NET executable
I will assume that this is a .NET application, so the .NET framework is loaded first and then the application is run. From how you wrote the sentence, one could also think it's a C++ (native) application that runs and then loads .NET as a hosting process (which I think is unlikely).
WinDbg will stop at the "initial breakpoint", which is the first time the debugger can take control over the process. At this time, the executable has not run yet. For .NET, this also means that .NET has not been loaded yet.
You can wait until .NET was loaded by setting a breakpoint for loading the clr
module like so:
sxe ld clr
When that breakpoint is hit, .loadby sos clr
will work, since it can find the CLR module, determine its path and then load SOS from the same directory. The syntax error you're getting is because the command .loadby
needs the second argument to search the related module.
Other than that, you can load SOS with .load
and the full path. Just make sure you load the correct version.
Note that some of the commands may not work until .NET has also been initialized, i.e. the managed heap is functional. For "normal" .NET applications, you could set a breakpoint at the beginning of the Main
method.
Regarding 2, Silverlight
For Silverlight, the .NET module is not clr
but coreclr
, so the command needs to be changed to
.loadby sos coreclr
If Silverlight is running as a separate process (sllauncher.exe
), you may want to attach to that process (try .tlist
and .attach
) or debug child processes (.childdbg 1
) to make sure you capture problems there. Switch between processes with |xs
(where x is the process number).
Regarding 3, unmanaged ActiveX Control
This has nothing to do with .NET any more, so SOS will not help here (except to get the relationship between your .NET code and the native code).
You mention an "an IE certificate error". If that again is another process (iexplore.exe
), attach to it as well (commands as before).