developers.de
daenet's .NET Community

Managed debugging assistant (MDA) - ContextSwitchDeadlock

While debugging, you might have experienced this dialog.

This page explains the cause and also how to disable the diaglog using a config file. I was not able to disable it using the config but it is possible that this is because I am using a Test Project. I would have prefered this method because then it would only be disabled for a single application.

To disable the dialog for all applications, you can use a dialog accessed with the following menu path. Simply uncheck the box for ContextSwitchDeadlock.

Debug | Exceptions...


Posted Mar 31 2006, 11:55 AM by Scott Munro

Comments

Mike wrote re: Managed debugging assistant (MDA) - ContextSwitchDeadlock
on 08-06-2006 5:14
I'm getting this error on a threaded app that calls external (unmanaged) .dll's when I'm debugging and it's driving me mad!  Unfortunately in my VS2005 on the debug menu there is no Exceptions item so I can't for the life of me work out how to switch this off - and the stupid config file seems to be completely ignored by VS2005!

Any ideas Scott?  Anyone else?  (If you know and you feel like, drop me a line a line at mike AT 41south DOT com - cheers.
Milan wrote re: Managed debugging assistant (MDA) - ContextSwitchDeadlock
on 08-21-2006 18:23
Hi ,
I m  getiing same error i tried above option but it diable error.
and does nor run cont code.

Milan
Scott Munro wrote re: Managed debugging assistant (MDA) - ContextSwitchDeadlock
on 10-17-2006 16:49
Hi Mike,

I have seen some cases of a missing Debug|Exceptions menu. As a quick workaround, you can use the keyboard combination CTRL + Alt + E as a shortcut to the dialog that the menu is supposed to open.

Cheers,

Scott
Mariska wrote re: Managed debugging assistant (MDA) - ContextSwitchDeadlock
on 12-05-2006 21:57

Thank Scott! It really works!!

Scott Munro wrote re: Managed debugging assistant (MDA) - ContextSwitchDeadlock
on 12-06-2006 9:24

Hi Mariska. Glad to hear it!

tommy wrote re: Managed debugging assistant (MDA) - ContextSwitchDeadlock
on 06-04-2007 15:49

thanks for the tip about the keyboard shortcut.

I searched for missing menus in vs2005 and found a solution for it:

http://www.xmlx.net/software/2006/02/missing_command.html

Apparently just use the Tools -> Customize tool to add/remove items to the tool and menubars.

Scott Munro wrote re: Managed debugging assistant (MDA) - ContextSwitchDeadlock
on 06-04-2007 18:41

Thanks Tommy!

It makes you wonder why it went missing in the first place (and what other commands might still be missing) but it is nice to have my exceptions menu back.

Nick wrote re: Managed debugging assistant (MDA) - ContextSwitchDeadlock
on 08-23-2007 20:24

Thanks for the menu bit. Banging my head against my monitor trying to figure out WHERE and HOW to hit the ContextSwitchDeadlock checkbox.

Cheers.

Managing Debugging Assistant (MDA - RCW) - Damir Dobric Posts wrote Managing Debugging Assistant (MDA - RCW) - Damir Dobric Posts
on 09-05-2007 15:50

Pingback from  Managing Debugging Assistant (MDA - RCW) - Damir Dobric Posts

Shahzad wrote re: Managed debugging assistant (MDA) - ContextSwitchDeadlock
on 09-26-2007 10:50

Hi Scott,

This is very informative post, but I need a little bit more help. I, in fact, don't want to disable this dialog rather I need something to resolve the issue in itself. My application becomes very slow with the pessage of time and also takes too much memory due to this COM Context transition. So I'll be really greatful to you if you could help me in this issue.

Thanks

Dave wrote re: Managed debugging assistant (MDA) - ContextSwitchDeadlock
on 04-21-2009 19:48

After much serching, the solution for me was to add

Application.DoEvents();

to the loop I was running when the error occured.  As the loop will take over 3 minutes to finish.  This seems to have resolved the issue in its entirety.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?