admin管理员组文章数量:1278880
I don't get any error in firefox or firebug, but yet in IE I get invalid argument for some reason, and I can't figure out what is the invalid argument, the javascript halts when "error" is discovered .. what can I do to debug it ?
I don't get any error in firefox or firebug, but yet in IE I get invalid argument for some reason, and I can't figure out what is the invalid argument, the javascript halts when "error" is discovered .. what can I do to debug it ?
Share Improve this question asked Feb 20, 2010 at 20:31 antant 22.9k36 gold badges135 silver badges185 bronze badges8 Answers
Reset to default 6Firebug Lite is awesome.
If you're running IE8, you can use the developer tools by pressing F12. You can also download them for IE7.
If you have Visual Studio you can use it directly to debug javascript. First uncheck the advanced IE settings "Disable script debugging" then attach VS to the IExplorer process (Tools => Attach To Process then find the process).
Clearly this is not the easiest option here but can work in a pinch. If you are already using VS to do your development just disabling script debugging and launching your website with IE will allow the JS debugger to work automatically.
Enable the script debugger in IE.
Note that with jquery or mootools 90% of the IE bugs (when it works fine in FF) is because I didn't explicitly extend an element I was working with.
In firefox you can just say element.jquery_function()
, however with IE the element must be explicitly extended with element = $(element)
, or just get in the habit of writing $(element).jquery_function()
.
You didn't give enough info to debug your problem, but i'd guess that is a good place to start.
note: I use mootools but i'm assuming this also applies to jquery
get internet explorer 8, or the internet explorer developer toolbar
I prefer DebugBar over Firebug Lite.
I would use a cross-browser logging library such as my own log4javascript.
If you're on IE 8, that es bundled with developer tools.
If you're on IE 7 or 6, there's the free IE Developer Toolbar from Microsoft.
There's also Companion.JS for IE 6/7.
本文标签: javascriptHow to deal with IE errorsStack Overflow
版权声明:本文标题:javascript - How to deal with IE errors - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741211723a2359255.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论