views:

147

answers:

4

Hi there,

currently setup vs 2008 and been doing "PURE" javascript debugging with eclipse... so i wanted to give vs 2008 a try and debugging "PURE" javascript... I have vs2008 sp1 and i have unchecked the "disable ie client sscripting" in the IE8...

I now set my breakpoint (in a .js file) and Attach process. and mark Internet explorer ... but problem is .. it says it will never be hit...

anyway i tested it .. i load up my html in the browser WHICH I KNOW calls my js file.. but nothing happens, am i missing something?

+2  A: 

Make sure you change Attach To to Script from the default which is Managed Code. This got me a few times.

Geoff
Yes thank you... also i noticed when i have 1 page of ie open . there is actually 2 processes, i needed to attach to the process that actually didn't have the name of page - a bit strnage... but its all working,..
mark smith
A: 

Write

debugger;

into your script where you want to start debugging. and run your application. When the script reached it will stop and ask you if you want to debug. Then choose VS.NET 2008 at the list.

Canavar
A: 

Check out the script explorer in Visual Studio 2008. When you F5 your app VS will list all the scripts inside your page inside the script explorer. Once running you can set breakpoints on the js code.

Dav Evans
A: 

In ie8 you have now a powerfull javascript debugger in ie dev tools bar integrated.

Cédric Boivin