最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

debugging - vs2010: trying to debug javascript using Chrome: this is not a valid location for a breakpoint - Stack Overflow

programmeradmin0浏览0评论

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?

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?

Share Improve this question edited Jun 9, 2010 at 4:41 Chad asked Jun 9, 2010 at 4:10 ChadChad 24.7k54 gold badges202 silver badges331 bronze badges 3
  • Do you have "Disable Script Debugging" disabled in your browser? – RPM1984 Commented Jun 9, 2010 at 4:19
  • Excellent suggestion. Yes, it is unchecked for both IE and Other browsers. – Chad Commented Jun 9, 2010 at 4:32
  • See ny edit. Sorry for the original ommision. – Chad Commented Jun 9, 2010 at 4:42
Add a comment  | 

2 Answers 2

Reset to default 10

You can debug javascript within chrome alone.

See this
How do you launch the JavaScript debugger in Google Chrome?
http://www.youtube.com/watch?v=c_oiQYirKuY&feature=player_embedded
https://developer.chrome.com/devtools http://www.chromium.org/devtools

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!');

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论