New Posts New Posts RSS Feed: TechTip: ContextSwitchDeadlock in Visual Studio 2005
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

TechTip: ContextSwitchDeadlock in Visual Studio 2005

 Post Reply Post Reply
Author
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Topic: TechTip: ContextSwitchDeadlock in Visual Studio 2005
    Posted: 09-Jul-2007 at 12:23pm
Level 100
DevForce Express
View%20all%20Tech%20Tips ContextSwitchDeadlock in Visual Studio 2005

Anyone who has been debugging within Visual Studio for any length of time has probably encountered the following message.

 

This is invariably very frustrating because it usually happens when you are deep in a debug trace and in order to continue debugging you need to restart the entire debug session. This is not always a simple process. More annoying is the fact that the error message is anything but helpful in determining what it is that you actually did wrong.

In fact, you didn’t do anything wrong. Visual Studio was just trying to help.

The following link describes the problem in some detail.

 
http://msdn2.microsoft.com/en-us/library/ms172233.aspx

There are several approaches that we have found to work around the problem. One simple but fairly severe approach is to execute a .reg file with the following contents.

 
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="0"

Another alternative is to go the menu in Visual Studio and uncheck the ContextSwitchDeadlock item.

Hopefully this will make debugging a slightly less painful experience.

 
Debug -> Exceptions -> Managed Debug Assistants
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down