Welcome Guest. Sign in or Signup

0 Comments

How to display debug information in the browser’s console?

Asked by: 9872 views 3. Widgets, a) Getting Started

0
0

The browser’s console receives messages from browser when it is open. You would typically write some debug information into the console to debug issues, etc. console.log(someText) is the API that’s now available in the latest version of all popular browsers. This is a great way to display non-intrusive debug information instead of the alert message box.

In IE, to view the browser console, hit F12 to show the “developer tool” in browser and select the console tab or the console tab which is inside the script tab.

IE Console in Developer Tools

Something similar is supported in all major browsers.

Remember that if you do not have the console open, then you might get the “console is undefined” error in IE 9.

More info on using console.log in IE can be found here:
Blog on IE Console.Log Support

Comments on Question