Friday 26 August 2011

Visual Studio 2008 debugger is broken?

Recently, my colleague said his visual studio 2008 debugger is broken. When he tries to run debugging, the following error always comes out.  


An error occurred that usually indicates a corrupt installation (code 0x80004002).
If the problem persists, repair your Visual Studio installation via 'Add or Remove Programs' in Control Panel.



Through looking around on internet, it seems like the debug dll file can not be linked when you run visual studio debugging. Some people said installing VS2008 and VS2010 at the same machine or install some other software which includes higher version VS complier might change VS 2008 debug environment. 


One way can fix this issue is to register the dll manually.
regsvr32 "C:\Program Files\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll"
if you are running X64 system, you might need to run the following line
regsvr32 "C:\Program Files(x86)\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll"

3 comments:

  1. Thank you! You saved me hours of work, because I was going to perform an OS re-installation. I was having this issue trying to debug in Visual Studio 2008. I had a recent version installed before (2012), I uninstalled it and installed the 2008. Everything was working fine till I restarted the computer. Then, I was getting the error, and then repaired the installation, update to the SP1 and getting desperate.... till I found your post. Thanks!

    ReplyDelete
  2. thank you, magically its work. even when i'm entering command in console and another error appearing

    ReplyDelete
  3. DLL registration helped me too. thanks.

    ReplyDelete