views:

574

answers:

2

Everytime I try to set a debug point in Javascript, eietehr while in Design mode or while runniong, I get the error:

 trying to set a breakpoint in javascript: this is not a valid location for a breakpoint

When I go to VS2010's Options screen under Debugging Just In Time, I see that Managed, Native & Script are selected,

I also placed the line "debugger;" in the first line of a javascript function that is called but the break is never hit.

In the Web.Config (although this is probably for compiled code:):

<compilation debug="true

I'm reliving this problem on a new machine...Can u help?

Edit: I left out a huge detail:

Google Chrome is my default browser.

(I am trying to debug a Chrome-only error.)

Must I resort to other debug tools other than VS2010? I am thinking that it should work. Too hopeful, eh?

+1  A: 

visual studio only debugs js running in IE, as far as I'm aware. chrome has a console-type debugger which I have no idea how to use- it's available from the page icon>developer>javascript console. you could also look into chrome extensions to see if anyone has created a nicer debugger. i know there's a firebug extension available but i'm not sure what features it offers.

if all else fails:

alert('made it this far!');
lincolnk
+3  A: 

You can debug javascript within chrome alone.

See this
http://stackoverflow.com/questions/66420/how-do-you-launch-the-javascript-debugger-in-google-chrome http://www.youtube.com/watch?v=c_oiQYirKuY&amp;feature=player_embedded http://www.chromium.org/devtools

Ismail