ASP.NET 2.0 and IIS 6.0

How to disable Managed Debug Assistants?

When I wrote a C# program which calls a library which is a wrapper of COM ojbect and debugging with Visual Studio 2005, I always got the annoying Managed Debug Assistants popup complains about InvalidVariant.

InvalidVariant was detected
Message: An invalid VARIANT was detected during a conversion from an unmanaged VARIANT to a managed object. Passing invalid VARIANTs to the CLR can cause unexpected exceptions, corruption or data loss.

The MSDN article http://msdn2.microsoft.com/en-us/library/d21c150d.aspx gives 3 ways to disable the MDA but none of them works for me.

There is MSDN blog about MDA but none of them get the right solution about how to disable MDA. http://blogs.msdn.com/jmstall/archive/2005/11/10/introducing_mdas.aspx

Here is the right solution:

Bring up the Debug -> Exceptions dialog. Under Managed Debugging Assistants, uncheck the InvalidVariant MDA.

Published Tuesday, March 21, 2006 7:11 PM by Yangxin Deng

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Scott Singer said:

Disabling the MDA via the Debug | Exceptions menu only disables *reporting* of the condition.  The MDA will still be "alive" and hooked in.

March 21, 2006 3:32 PM
 

Gab said:

I love you!
March 30, 2006 12:55 AM
 

Trading Strategy » How to disable Managed Debug Assistants? said:

April 20, 2008 3:15 PM

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

About Yangxin Deng

World

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker