admin管理员组

文章数量:1346063

I'm trying to get javascript debugging working with IE9 and VS2010.

I've enabled debugging in IE9.

I've made sure that Silverlight debugging is disabled in the project settings.

And placed a breakpoint in my (Razor syntax MVC3) code.

And nothing happens when I run it :/

This has been happening for a few months now and over many projects, so it's not just that the breakpoint is never reached or something silly and code based.

I've tried:

Uninstalling and resinstalling IE9.

Making sure I have the latest MVC tools so the Razor editor is up to date.

Making the bare minimal amount of code required.

Following all the 'guides' I could find (which are all just variations on what I did above).

Doing the same thing on colleagues machines, and it works.

Manually setting a breakpoint with 'debugger;'. This causes the 'pick your debugger' windows to appear, and in that list I have new or existing VS instances except for the one running the site i.e. the one that would do the job.

IE is my default browser.

I'm trying to get javascript debugging working with IE9 and VS2010.

I've enabled debugging in IE9.

I've made sure that Silverlight debugging is disabled in the project settings.

And placed a breakpoint in my (Razor syntax MVC3) code.

And nothing happens when I run it :/

This has been happening for a few months now and over many projects, so it's not just that the breakpoint is never reached or something silly and code based.

I've tried:

Uninstalling and resinstalling IE9.

Making sure I have the latest MVC tools so the Razor editor is up to date.

Making the bare minimal amount of code required.

Following all the 'guides' I could find (which are all just variations on what I did above).

Doing the same thing on colleagues machines, and it works.

Manually setting a breakpoint with 'debugger;'. This causes the 'pick your debugger' windows to appear, and in that list I have new or existing VS instances except for the one running the site i.e. the one that would do the job.

IE is my default browser.

Share Improve this question edited Aug 25, 2011 at 18:26 asked Aug 25, 2011 at 14:39 user310988user310988 7
  • Have you tried Chrome? It has a "Developer tools" and "JavaScript console" view. – Jack Commented Aug 25, 2011 at 15:37
  • Jack: IE has a developer tools and Javascript console view, too. (Press F12 to get it) He's trying to use Visual Studio. – Cheeso Commented Aug 25, 2011 at 15:45
  • Have you set IE as your default browser? In my experience VS needs to launch the IE session automatically when you debug the project for the JS debugger to work in VS (and will only do so when IE is default). – Wyatt Commented Aug 25, 2011 at 17:25
  • whatgoodisaroad: Yep, IE is my default browser, I should have put that in the original post. – user310988 Commented Aug 25, 2011 at 18:26
  • Jack: Chrome is what I usually use, this is why I've put up with this problem for so long. Today I was using the chrome dev tools and it crashed on me which prompted me to try and fix this issue once more. Having debugging with VS working would be ideal for me as I'd then be able to step between the client and server seamlessly. – user310988 Commented Aug 25, 2011 at 18:30
 |  Show 2 more ments

1 Answer 1

Reset to default 8

when you run the application in dot net with IE as a default browser
you can see the solution explorer add up something at last as shown in the black box
that have the file name being loaded in explorer eg "localhost" here
just double click on the file you will see the html code as well as the JavaScript there
now over here you can put the breakpoints and it will work for sure

本文标签: