Error Line Number Ie
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this
Ie Party Line Number
site About Us Learn more about Stack Overflow the company Business Learn internet explorer script error line 147 more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x
Javascript Error Line Number
Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Retrieving the line number from an Internet Explorer error object up vote 1 down vote favorite 1 Is there a way to retrieve the line number from an Internet Explorer 7/8 error object? I'm only aware of the .message, .description and .number properties. I've searched around a bit and found an MSDN article on .stack ( http://msdn.microsoft.com/en-us/library/hh699850(v=vs.94).aspx ), but even using their own example code doesn't return a line number: http://jsfiddle.net/LWevS/ javascript internet-explorer share|improve this question edited May 22 '12 at 22:36 asked May 22 '12 at 22:30 Elliot B. 6,06032866 Does this question help? –Ken White May 22 '12 at 22:33 Unfortunately it doesn't, I'm not setting up a debugger for dev purposes but rather once the code is in production. We'd like to be able to turn on JS error logging and store line number back instead of just a description of the error. –Elliot B. May 22 '12 at 22:35 You should perhaps edit your question to add that information, as it makes a difference in possible answers. –Ken White May 22 '12 at 22:37 1 Don't have an answer for you, sorry, but I had to comment 'cause your name is eerily close to mine. :-) –Elliot Bonneville May 22 '12 at 22:37 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote accepted I dug around some more and found that it is possible to retrieve the line number in IE using window.onerror. It's not from the Error object
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up show line numbers for console statements in IE 9 debugger up vote 3 down vote favorite I hope this is something simple.. I am http://stackoverflow.com/questions/10711072/retrieving-the-line-number-from-an-internet-explorer-error-object using the F12 Development tool debugger in IE 9. Is there a way I can display the line numbers and file source for each console statement, the same way that Firebug displays this info? I may have overlooked something basic, but I haven't yet found a way to do this..Thanks! javascript console internet-explorer-9 ie-developer-tools share|improve this question asked Jan 8 '13 at 18:44 JasonBK 2871623 1 no answers...is it possible IE has a debugger http://stackoverflow.com/questions/14221898/show-line-numbers-for-console-statements-in-ie-9-debugger that doesn't give you line numbers of console statements? Is someone kidding me? –JasonBK Apr 9 '13 at 19:56 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted The only way to get line numbers is to define a window.onerror method: window.onerror = function (message, url, lineNo) { console.log('Error: ' + message + '\n' + 'Line Number: ' + lineNo); return true; } console.log(window); console.log(1=2); But even then, IE breaks on the error, so it's rather useless. share|improve this answer answered Aug 26 '13 at 23:55 community wiki Paul Sweatte add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged javascript console internet-explorer-9 ie-developer-tools or ask your own question. asked 3 years ago viewed 1127 times active 3 years ago Blog Stack Overflow Podcast # 90 - Developer Stories, Charger Butts, and Joel's… Bye Bye, Bullets: The Stack Overflow Developer Story is the New Technical Resume Related 0How do you send log messages to the console from JavaScript in ie8?2IE9 plat
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads http://stackoverflow.com/questions/5203322/get-to-exact-line-with-javascript-error-in-ie8 with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Get to exact line with javascript error in IE8? up vote 1 down vote favorite If I have an error in my javascript code, and I run the page on google chrome, I click wrench icon > tools > JavaScript error line 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 error line number 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. javascript internet-explorer share|improve this question asked Mar 5 '11 at 10:51 oyvey 1511516 Maybe Firebug Lite could help you out? getfirebug.com/firebuglite –polarblau Mar 5 '11 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.com, but I think that are better choices to do the same. –Fran Verona Mar 5 '11 at 13:05 1 @Fran Verona: Please read my comment 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 Mar 5 '11 at 14:06 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote accepted 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