Internet Explorer 8 Error Console
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 site console.log not working in ie11 About Us Learn more about Stack Overflow the company Business Learn more about internet explorer console log hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss console is undefined ie9 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 What happened to console.log
Console.log In Ie8
in IE8? up vote 244 down vote favorite 81 According to this post it was in the beta, but it's not in the release? javascript logging internet-explorer-8 console share|improve this question edited Mar 22 '12 at 22:22 Doug Harris 99821026 asked Mar 27 '09 at 15:34 leeand00 8,7021988200 62 console.log is there in IE8, but the console object isn't created until you open DevTools. ie console commands Therefore, a call to console.log may result in an error, for example if it occurs on page load before you have a chance to open the dev tools. The winning answer here explains it in more detail. –SDC Jan 28 '13 at 15:31 add a comment| 17 Answers 17 active oldest votes up vote 221 down vote accepted Even better for fallback is this: var alertFallback = true; if (typeof console === "undefined" || typeof console.log === "undefined") { console = {}; if (alertFallback) { console.log = function(msg) { alert(msg); }; } else { console.log = function() {}; } } share|improve this answer answered May 11 '11 at 16:33 orange80 8,21884458 Thanks, this helped me a lot, nicely done –martinjbates Oct 2 '12 at 8:45 66 This is so impractical - how could you possibly debug a website with something that throws an alert for every call to console.log(). What if you have 10+ calls to log() in your code. What if msg is an object? Walter's answer makes much more sense, as a starting point. –Precastic Jun 22 '13 at 10:47 6 @Precastic: People will just stop u
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Samples Retired content We’re sorry. The ie11 console is undefined content you requested has been removed. You’ll be auto redirected in 1 second. How-tos
F12 Console Tricks
and Samples (by IE version) Internet Explorer 11 Samples and Tutorials Using the F12 developer tools Using the F12 developer tools
F12 Console Commands
Console Console Console DOM Explorer Console Console error messages Debugger Network UI Responsiveness Profiler Memory Emulation Keyboard shortcuts TOC Collapse the table of content Expand the table of content This documentation is archived and is http://stackoverflow.com/questions/690251/what-happened-to-console-log-in-ie8 not being maintained. This documentation is archived and is not being maintained. Using the Console to view errors and debug Use the Console tool to view errors and other messages, send debug output, inspect JavaScript objects and XML nodes, and to run JavaScript in the context of the selected window or frame. A window into your code The primary use for the Console tool is to communicate into and out https://msdn.microsoft.com/en-us/library/dn255006(v=vs.85).aspx of running webpages: In: You run JavaScript to view and change values in running webpages, add functions to running code, and run debug code on the fly. Out: Internet Explorer and JavaScript code deliver status, error, and debug messages to developers, including inspectable JavaScript objects and DOM Nodes. Sending info to the Console Selecting your execution target Messages Internet Explorer sends to the console Messages developers can send to the console from code Managing messages for readability Selecting your execution target New in Windows 8.1 Update, the Console has a Target drop-down menu just above the Console output pane. If the webpage you're viewing has an iframe element in it, select the iframe from the Target menu to run Console commands solely in the scope of the iframe. If your webpage has no iframes, the only selection will be "_top." Messages Internet Explorer sends to the console By default settings, the Console won't show any messages until you start it. Start it by opening the F12 developer tools, and selecting the Console tool (CTRL + 2). You can also open the Console within another tool using the Show console button in the upper-right of the tools pane or CTRL + `. From this image, you can see that In
be down. Please try the request again. Your cache administrator is webmaster. Generated Mon, 17 Oct 2016 14:49:43 GMT by s_ac4 (squid/3.5.20)
that make connections all over the world. Join today Download & Extend Drupal Core Distributions Modules Themes Media ColorboxIssues IE 8 throws "console is undefined" error, breaking all other javascript on the page Needs workProject:Media ColorboxVersion:7.x-1.x-devComponent:CodePriority:CriticalCategory:Bug reportAssigned:UnassignedReporter:dianacastilloCreated:October 29, 2013 - 19:20Updated:April 10, 2015 - 13:34 Log in or register to update this issue Jump to:Most recent comment Most recent attachment this module causes a "'console' is undefined" error in mediacolorbox.js when using IE 8 . Has anyone run across this problem?Files: CommentFileSizeAuthor #2 media_colorbox-fix_console_undefined.patch489 bytescoredumperror Comments Comment #1 coredumperror CreditAttribution: coredumperror commented October 29, 2013 at 10:34pm I'm currently working on tracking this down as well, because it completely breaks my site for users on IE8. It appears to be related to media_colorbox.js being loaded without jquery.colorbox-min.js also being loaded. Log in or register to post comments Comment #2 coredumperror CreditAttribution: coredumperror commented October 29, 2013 at 11:05pm Title: IE 8 causes 'console' is undefined » IE 8 throws "console is undefined" error, breaking all other javascript on the page Version: 7.x-1.0-rc4 » 7.x-1.x-dev Priority: Normal » Critical Status: Active » Needs review FileSize media_colorbox-fix_console_undefined.patch489 bytes OK, here's a patch that fixes this problem. It changes the media_colorbox.js file to only call console.log() if the console object actually exists. The attached patch is just a quick and dirty fix. The real fix for this is to take the "scripts[] = media_colorbox.js" line out of media_colorbox.info, and instead call drupal_add_js() to add the media_colorbox.js file only where it's needed. The problem arises because media_colorbox.js currently gets added to every page, but jquery.colorbox.js doesn't, which is what's triggering the call to console.log(). I'd do this step myself, but I don't know which functions would need to have that drupal_add_js() line. I'm also bumping this issue to critical, be