views:

26

answers:

1

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 !

A: 

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.

Ilya Volodin
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 !
ultraman69