2

It is supposed to be one of the great feature of VS 2008, javascript debugging. But so far, I couldn't make it work. The only way is by using the "debugger" keyword (which don't really work for me but that's another story). Do you have any clue on why it's not working ? I unchecked the "Disable script debugging..." in the IE8 options but it still not works. FYI, I am in a MVC app on my machine (not remote).

Thanks !

1
  • need more info than "it doesn't work". what actions are you taking and what's not happening that you're expecting? Commented Aug 10, 2010 at 18:15

2 Answers 2

1

I used to think the same, until I found where to put the breakpoints... where to put your js breakpoints

Sign up to request clarification or add additional context in comments.

3 Comments

What should that screen shot tell us? It tells me you want to debug Default.aspx and you are using jQuery. But it does not tell me how you enabled the breakpoints ... I usually get "no symbols loaded..."
@Matt when you start debugging, one set of "Script Documents" are created, and is shown as part of your solution. This is the place where the actual debuging happens, not your own files.
Thank you for the hint, I will try that. Somehow I managed to create breakpoints on the normal js Files in VS2013 too, but they sometimes work, sometimes not. Meanwhile I am using VS2015, and still the same issue.
0

The way to debug JS from VS is to attach directly to the browser. Go to Tools->Attach to Process (if you don't have an project opened, or Debug->Attach to Process if you do). Select "iexplorer" from the list, make sure to select the right instance, also make sure that the instance you selected has "Script, x86" in the type column. Make sure that "Attach to:" is set to "automatic". Attach. You should now see the list of all pages and resources in your Solution Explorer window. Open up the right file (from solution explorer), set up breakpoints and debug away.

1 Comment

As I said, they told us js debbuging would be a walk in a park with VS 2008 (Scott Guthrie's blog among others). You were supposed to just put a breakpoint and voilà ! It just doesn't work. Ilya, your way works without even having to do the Attach sep, but tuer is way too many for us to check everytime. I guess I'll have to stick with the good old "debugger;" keyword. Thanks !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.