VS2010 and IE10 Attaching the Script debugger to process iexplore.exe failed

77,231

Solution 1

There is a simpler fix for the JavaScript debugging issue in IE10:

  1. Close IE
  2. In elevated cmd prompt run this command:

    regsvr32.exe "%ProgramFiles(x86)%\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll"
    

(or %ProgramFiles% on a 32-bit OS)

Solution 2

The IE10 upgrade resets a whole bunch of stuff. I followed 2 steps to fix this.

  1. In IE Advanced settings, under browsing remove the tick on "Disable script debugging (Internet Explorer)"
  2. Running this in command prompt (with administrator rights): -

    regsvr32.exe "%ProgramFiles(x86)%\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll

The combination of these 2 and a browser restart of course fixed it for me.

I also agree, the marked solution above of un-installing is hardly a proper solution.

Solution 3

I have exactly the same problem .. I found a temporary solution but I have to execute each time the same sequence is as follows.

  1. Click on the menu "Debug"
  2. Click on the "Window" menu
  3. Click on the menu "Processes"
  4. And right click on iexplorer.exe and "detach the process"

The problem is that every time I have to repeat this procedure every compilation of my project ...

Solution 4

I was having the same problem with VS2010 & IE10 (Win7). After weeks of trying to resolve this issue I finally decided to fire up VS2012 to debug my site. I also updated VS2012 to SP1 and restarted my machine and now VS2010 debugging works fine in IE10.

So try installing VS2012 SP1 to fix compatibility issues with VS2010 & IE10.

Solution 5

Someone suggested that running this in an elevated command prompt would do the trick:

regsvr32.exe "%ProgramFiles(x86)%\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll"

I tried it and it reported the dll was not found. I searched for the msdbg2.dll and it was not found. It is, apparently, hidden.

I ran:

regsvr32.exe "C:\Program Files (x86)\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll"

and it worked.

This was on Windows 7, 64 bit, VS2010 Premium

Share:
77,231
mstaffeld
Author by

mstaffeld

Updated on November 29, 2020

Comments

  • mstaffeld
    mstaffeld over 3 years

    So I am using Win7 x64 with VS2010 and have installed the IE10 Win7 Preview and ReSharper 6.1.

    When I attempt to Start Debugging, I receive the following:

    "Attaching the Script debugger to process '[1111] iexplore.exe' on machine 'MINE' failed. A debugger is already attached."

    I can click OK and look at attached debug sessions - [1111] is grayed out and there is another instance of iexplore.exe with my solution title. I can attach manually and it works fine.

    I thought maybe since there were two iexplore.exe pids there would be something wrong, there are not two tabs or windows open and I disabled automatic crash recovery.

    Tried this: Attaching the Script debugger to process '[XXXX] IEXPLORE.EXE' on machine 'NAME' failed

    Did not work.

    Any ideas?

  • mstaffeld
    mstaffeld over 11 years
    I did try and repair the VS2010 installation - without success in fixing this issue. I have since uninstalled IE10 due to some gross incompatibilities of our existing code base. Yikes. Thanks.
  • mstaffeld
    mstaffeld over 11 years
    This is what I ended up doing and will mark this answered - seems kinda funny. Thanks.
  • Gaff
    Gaff over 11 years
    This did the trick for me, although I had to attach to every instance of iexplore.exe.
  • Shawn
    Shawn over 11 years
    This is the closest answer to the problem at the moment. Anything can be configured for Debug?
  • Monsignor
    Monsignor over 11 years
    Please remove 'Accepted' mark from this answer. As bill berlington mentioned - this is NOT a solution. If I suggested you to stop using Win7 and VS2010, would you accept it?
  • Fares
    Fares about 11 years
    Thank you, this worked right away, I had tried almost every other suggestion. I wonder if the culprit is VS2012 and IE10 on Win7, or just VS2012.
  • C.M.
    C.M. about 11 years
    Same for me: installing VS2012 express web edition fixed the IE10 issue in VS2010.
  • Joe Johnston
    Joe Johnston about 11 years
    Running repair for VS2010 pro did not work. IE script debug settings had no effect. This will have to do until its actually fixed or I move to the prison like VS2012. I don't think I would call it a solution but it is a work around. IE 10 was not a requirement for me.
  • Kapil Khandelwal
    Kapil Khandelwal about 11 years
    This is not working. VS 2010 still show the error message. "A debugger is already attached."
  • Ziad
    Ziad about 11 years
    It worked like a charm for me on VS2012 and it stops working as soon as I unregister it. Thanks a ton!
  • profMamba
    profMamba about 11 years
    The regsvr32 answer provided by Dmitri actually fixes the problem, or at least has a high likelyhoodof fixing it (worked for me). Please mark that as answer.
  • Allie
    Allie about 11 years
    agreed, going back to IE9 is not a solution, the regsvr32 action below does it
  • Marc Temanson
    Marc Temanson about 11 years
    Ditto...This solution worked for Win7, 64-bit with VS2010 and IE10
  • T-moty
    T-moty about 11 years
    For me, worked perfectly at first time. win7 x64, IE10, VS2010
  • kvc
    kvc about 11 years
    This worked for me win7 64 bit and IE10,This should be marked as answer
  • Marcel
    Marcel about 11 years
    This helped me on a German Win7 box (32bit), with VS2010 and IE10: regsvr32.exe "C:\Program Files\Common Files\microsoft shared\VS7Debug\msdbg2.dll"
  • onefootswill
    onefootswill about 11 years
    Definitely not an answer. This is surrender. regsvr32 worked.
  • JustinP8
    JustinP8 about 11 years
    I tried the highest voted answer to no avail, and I already had VS2012 Update 1 installed, but I had installed it before I installed IE10. I ran the VS2012 Update 1 installer again, with the "repair" option, and it fixed this problem.
  • dyslexicanaboko
    dyslexicanaboko about 11 years
    Okay so it isn't the best solution, however I do think there is merit here because all of these issues showed up AFTER installing IE10 (I installed it yesterday, not a strange coincidence). MS should probably fix this so people won't be tempted to uninstall their browser. This problem just wasted about 4 hours of my day. So thank you for the solution - good or not - at least one was provided.
  • JFish222
    JFish222 about 11 years
    Yes the regsvr32 fix is the ideal fix: You get IE10 and a working environment. It does have merit! BUT! When evaluating potential updates I do not start with "How can I hack this breaking change to work". Regsvr32 fix is not ideal for corp environments where a hack/custom fix can cause potential errors down the line. Why is this dll registered/present? How will MS address this issue and utilize that dll in the future. Changing the system to a non-standard state in a corporate environment is a bad idea (though I'll do it on my home box). For the rest of us, we contact MS for a HotFix.
  • iOnline247
    iOnline247 about 11 years
    This worked for me on Win7x64, VS2010, IE10. Thanks for the help!
  • Mayank
    Mayank about 11 years
    Worked on Win 7 x64 with VS 2012 & IE 10
  • TheVillageIdiot
    TheVillageIdiot about 11 years
    Why this was not selected as answer? Worked for me (IE10, VS2010, WIN 7 64bit).
  • yourbuddypal
    yourbuddypal about 11 years
    I too had to make both of the changes you mentioned. If you try to attach in Visual Studio to the IE process, it doesnt even show Script debugging as a Type without those settings disabled.
  • flying227
    flying227 about 11 years
    This worked for me. I have Win 7, VS2010 and then installed VS2012 Express (free version) and it resolved this issue.
  • Win
    Win about 11 years
    Make sure to Run as administrator.
  • NightOwl888
    NightOwl888 about 11 years
    It should be noted that it is called VS2012 Update 1, not VS2012 SP1. I applied VS2012 Update 2 (without having Update 1 installed) and it also fixed the issue.
  • Tom Brown
    Tom Brown about 11 years
    Very helpful. Worked on Windows Server 2008 R2 - 64-bit, VS2010 ultimate SP1Rel, IE10
  • Joel McBeth
    Joel McBeth about 11 years
    Probably could just upvote instead of posting the same comment over and over.
  • Martin Smellworse
    Martin Smellworse almost 11 years
    I have Visual Studio 2010 Premium. When you install VS2012 express web edition - can you still use Visual Studio 2010?
  • Rob Koch
    Rob Koch almost 11 years
    yes you may install both side by side - been developing like that since Feb 26th with no issues.
  • Andre Lombaard
    Andre Lombaard almost 11 years
    Thank you for removing a very irritating issue from my live. +1
  • Jack
    Jack almost 11 years
    Thanks, this worked perfectly on my machine (Windows 7, 64 bit, VS2010 Premium)
  • HATCHA
    HATCHA almost 11 years
    This work for me on Win7 - 64bit, VS2010, after update IE10. And run as Administrator is very important for normal user account.
  • Allie
    Allie almost 11 years
    yes, this worked ! I also was using exact same config. I also downgraded to IE9, and nothing worked. Then I also did the VS2012 update 2 and now debugging in VS2010 with IE9 is working again (I suppose IE 10 would work as well)
  • Bill Sambrone
    Bill Sambrone almost 11 years
    Works me - Win7 x64 / VS2010 / IE10
  • Jarrod
    Jarrod almost 11 years
    Ok, I finally did get this to work on my machine after several failed attempts. I had to have VS2010 closed, not just IE10 as I had tried.
  • Allie
    Allie over 10 years
    I came across another solution: you can choose "browse with" , and then you might see two times "internet explorer". Just select the other one and set as default. Now it might work. Worked for me...
  • mxasim
    mxasim almost 10 years
    reinstalling IE10 fixed my issue
  • Vikram
    Vikram over 9 years
    I was hoping that it would work for me too, as it worked for other people. But, it did not completely work. I could get rid of the alert that it was showing me and hence got an instinct that it will work, but it did not stop at the breakpoints. Am I supposed to detach the process after putting breakpoints or before that or it doesn't matter?
  • KurzedMetal
    KurzedMetal almost 9 years
    Interesting, any idea how to stop VS from automatically attaching?