Get to exact line with javascript error in IE8?

2019-08-01 09:59发布

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 complex 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.

1条回答
放荡不羁爱自由
2楼-- · 2019-08-01 10:10

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.

查看更多
登录 后发表回答