19

enter image description here

Windonws 7 64-bit and VS2010

In F12 developer tools for IE11 on Windonws 7 64-bit and VS2010, when I click the Debugger tool icon or press Ctrl + 3 to open the tool, I'm not able to debug my java-script files.

When I click the Debugger tool icon, i'm presented with the message in the screenshot above & I can't see the javacsript files my current page calls, so I'm unable to debug my javascript code.

Any one knows why I could be getting this message? I have tried everything mentioned at the following link with out success. VS2010 and IE10 Attaching the Script debugger to process iexplore.exe failed

Community
  • 1
  • 1
StackTrace
  • 9,190
  • 36
  • 114
  • 202
  • Did you search that error message on the web, second hit: http://www.codeproject.com/Articles/317704/JScript-Debugger-Unable-to-attach-the-process-Anot – epascarello Nov 25 '14 at 13:16
  • @epascarello, trust i have done every thing mentioned in that article & still no success. – StackTrace Nov 25 '14 at 13:25
  • Googled for this error and top hit was this stackoverflow page now. – dwilliss Apr 06 '16 at 14:49
  • @StackTrace did you get any workaround for this problem? – Steve Jul 26 '16 at 07:01
  • For those not aware of it. The error pops up because VS is attached as script debugger. This means that you can use VS to debug the javascript instead of IE Developer Tool. Just set the breakpoint in VS and it will be hit. – Mikael Holmgren May 16 '17 at 07:36

5 Answers5

17

I was encountering this problem with VS 2012 & Win 7 and also VS2013 and Win8.1:

Perplexed for half a day, looking up things online, finally figured it out myself.

Learn the difference between these in Visual Studio: F5 vs (Ctr+Shift+W)

F5 will engage VS debugger and you will get the:

"The script debugger failed to connect to the target process. A debugger is already attached"

when using the F12 Developer Tool in I.E. 11 or whatever version.

However, if you use the V.S. command: View in Browser(Ctrl+Shift+W) this will run the script and allow I.E's script debugger(F12 Dev Tool) to engage and work.

RB2
  • 173
  • 5
  • 4
    In Visual Studio, Start Without Debugging (Ctrl + F5) worked also for me – Stacked Feb 03 '16 at 12:56
  • Ctrl+Shift+W closed all but the current tab - a binding that I think I setup long ago. Ctrl+F5 worked for me though. I'll upvote this answer. – dwilliss Apr 06 '16 at 14:48
6

The easier way for me was:

  1. Run project(F5) in Firefox (or any other browser, not IE).
  2. Copy adress.
  3. Close Firefox (project will keep running, atleast did in myn).
  4. Open IE and input address manually (ex: http://localhost:58100/) by pasting what you copied in '2.'.
  5. IE Debugger should work at this point.
Gotham Llianen
  • 576
  • 1
  • 7
  • 19
  • 2
    I did that exactly and it worked. I prefer this option rather than Crtl+Shift+W or Shift+F5 because I can debug both the scripts (in IE) and the controllers (in VS). Thanks! – dsnunez Oct 21 '16 at 19:23
5

You should use ctrl+F5 instead of F5 so your application runs without debugging

Saman Qaydi
  • 171
  • 2
  • 7
1

I see this post is referred to Windonws 7 64-bit and VS2010, but I am using Windows 10 32 bit and VS Professional 2012 along with IE 11. I got the same message as shown in screenshot:

IE 11 Error message

How I resolved this problem(after starting Debugging):

  • went to debug tab in VS
  • then windows
  • select processes

There you will see two processes attached one will be "IIS" and second will be "IE.exe" with description "script". Detach the second one and then hit F12 in IE where your code is running.

coder9090
  • 63
  • 9
0

When I did iisreset from command prompt, I could resolve this issue.

Open CMD in admin mode -> type IISRESET -> enter

Vladislav Povorozniuc
  • 2,149
  • 25
  • 26
NidhinSPradeep
  • 1,186
  • 2
  • 14
  • 15