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 https://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. https://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.
Comments
Anonymous
March 21, 2006
Disabling the MDA via the Debug | Exceptions menu only disables reporting of the condition. The MDA will still be "alive" and hooked in.Anonymous
March 29, 2006
I love you!Anonymous
April 20, 2008
PingBack from http://stocks-options-trading.info/trading-strategy/?p=917Anonymous
April 20, 2010
ctrl+alt+e will launch the menu. I didnt see the option in 2010 under the debug menu, but the key combination still worksAnonymous
August 22, 2011
从非托管 VARIANT 转换为托管对象的过程中检测到无效 VARIANT。将无效 VARIANT 传递给 CLR 会导致意外的异常、损坏或数据丢失。http://www.g001.net参考Anonymous
August 22, 2011
从非托管 VARIANT 转换为托管对象的过程中检测到无效 VARIANT。将无效 VARIANT 传递给 CLR 会导致意外的异常、损坏或数据丢失 http://www.g001.net