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

internet explorer - Get to exact line with javascript error in IE8? - Stack Overflow

programmeradmin7浏览0评论

If I have an error in my javascript code, and I run the page on google chrome, I click wrench icon > tools > JavaScript console, and it shows me (in red) the exact line in my js causing the error.

On IE, I click the yellow "!" icon in the status bar, and it gives me an error message, along with a line #. While this is often helpful, many times it is not: (1) the line # in my source file often differs from the line # that IE gives me; (2) in plex systems, there might be several js files involved, and the IE message doesn't tell me which one.

So my question is: are there any options that get IE8 to show me the exact js line with the error -- without having to install anything?

I know that IE8 has a built-in javascript console, and I recall using it, but I don't remember figuring out how to achieve with it the goal I've stated in this post.

Thanks in advance.

If I have an error in my javascript code, and I run the page on google chrome, I click wrench icon > tools > JavaScript console, and it shows me (in red) the exact line in my js causing the error.

On IE, I click the yellow "!" icon in the status bar, and it gives me an error message, along with a line #. While this is often helpful, many times it is not: (1) the line # in my source file often differs from the line # that IE gives me; (2) in plex systems, there might be several js files involved, and the IE message doesn't tell me which one.

So my question is: are there any options that get IE8 to show me the exact js line with the error -- without having to install anything?

I know that IE8 has a built-in javascript console, and I recall using it, but I don't remember figuring out how to achieve with it the goal I've stated in this post.

Thanks in advance.

Share Improve this question asked Mar 5, 2011 at 10:51 oyveyoyvey 6231 gold badge9 silver badges20 bronze badges 3
  • Maybe Firebug Lite could help you out? getfirebug./firebuglite – polarblau Commented Mar 5, 2011 at 12:19
  • @polarblau Firebug only works on Firefox. There is a version for Chrome called "Firebug Lite", but the best is for Firefox. Another option is to use firebugger., but I think that are better choices to do the same. – Fran Verona Commented Mar 5, 2011 at 13:05
  • 1 @Fran Verona: Please read my ment once more and preferable more than two words of it. The link included btw. points to a page which states the following: "Compatible with all major browsers: IE6+, Firefox, Opera, Safari and Chrome". – polarblau Commented Mar 5, 2011 at 14:06
Add a ment  | 

1 Answer 1

Reset to default 5

What about using "Developing Tools" on IE8? I've been using for a while and works well. You can find it on "Tools" menu or pressing F12 key.

If you go to "Script" tab, you can find console, breakpoints, local variables, etc that could be useful to you.

发布评论

评论列表(0)

  1. 暂无评论