Link to home
Start Free TrialLog in
Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

asked on

Debug javascript in Visual Studio 2010

Hello Experts,
I am trying to debug Java Script codes in Visual Studo 2010.  I have already tried enabling Disable script debugging (Internet Explorer), Disable script debugging (Other).  Any idea what is going on?  I am able to debug the c# code, just fine.  Please let me know

Thank you in advance!
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

you need to bring up the developer tools in your browser and debug from there.
I hope you have put debugger; command in client side? Try launching the VS2010 in 'Run as administrator' mode and try again. Also make sure that you run the project in Debug mode.
Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

ASKER

David and Easwaran,
Thank you.  Currently I am trying to debug in Debug mode (not Release).  I tried to run as VS2010 as an administrator, still no good.

David, how would I bring up the developer tools?

Thank you!
Ctrl+Shift+i or F12 will usually show the dev tools when viewing your site in a browser.
Hi Rob Jurd,
I tried F12 as well as Ctrl + Shift + I.  Still I don't see the Dev Tools.  Any other suggestion?

Thank you!
What browser are you using?
Internet Explorer
I have already tried enabling Disable script debugging (Internet Explorer), Disable script debugging (Other).
you want to see the script errors so you need to uncheck disable script debugging (both areas) When you hit a script error you will be given the chance to open in debugger.  select new instance of VS20XX
Guys, Thank you for your help.  Please give me few to try your suggestions and update you.  Thank you again!
Here the screen shots of the example I have.  Still it is not able to debug.
JSDebug.png
c = a + b
variable b is undefined

Define variable B and initialize it
What happens if you check that box "use the built-in debugger of internet explorer"
I tried to use Developer Tool.  The error appears first.  By the time I activate the tool, nothing is left.  I just see my html codes.
Do you have a link to your page?

Have you tried debugging in another browser such as firefox or chrome?
Hi Rob,
I am still using localhost.  Yes, I tried with Google Chrome.  It shows me a blank page.

Thank you!
Use Google chrome. Open up the dev tools. Reload your page. You'll be able to debug your code.
https://developer.chrome.com/devtools
ASKER CERTIFIED SOLUTION
Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Already described above.