I have a C# .NET component that is being called from a COM out-of-process ActiveX exe.
I can start the debugger in Visual Studio 2005 running on my COM exe which calls my .NET component. Breakpoints work but breaking on an unhandled “Object reference set” exception does not. I have tried the following to no avail:
- have checked all the CLR exceptions in the VS Exceptions dialog
- enabled “Break when exceptions cross AppDomain or managed/native boundaries”
- enabled unmanaged code debugging on my projecy
- disabled “Just My Code” debugging
What I typically do is add a call to
System.Diagnostics.Debugger.Launch;at the entry point of my managed code. This will launch the debugger if the program is not already actively in debug mode. Keep in mind that you will need to remove this line after you finish debugging, as you would not want to keep a call to launch the debugger in the release version.