Using breakpoints to step through code:
Does not mean skip. Execute this code but if its a function I dont want to go into it. Just do it and move on.
The stack is a list of all current function calls and their parameters. The stack trace is a display of the current state of the stack which is useful for determining the state of your program when an error occurs.
Profiler - This keeps track of how many times each function is called and how much time it takes for each function to execute. To start it click the profile buttonin the console tab, then run your application one or more times. Click the profile button again to stop the profiler and view the report/profile in the console tab.
Firebugs Console Object
console.log - An addon that firebug offers
Very useful in helping you understand your own code better. Unlike an alert message, if you do not have the firebug console open, you will not see it. This is what''s intended. We can write out strings, variables, see output etc to the console itself.
// grab single element var myTitleLink = document.getElementById("mainTitle"); // information about the node console.log("This is a node of type: ", myTitleLink.nodeType); console.log("Inner HTML: ", myTitleLink.innerHTML); console.log("Child nodes: ", myTitleLink.childNodes.length); // how many links? var myLinks = document.getElementsByTagName("a"); console.log("Links: ", myLinks.length); // here are some extra examples of combining these: // First, grab a div called "homeNav" var navItems = document.getElementById("homeNav"); // get information about that node console.log("This is a node of type: ", navItems.nodeType); console.log("Inner HTML: ", navItems.innerHTML); console.log("Child nodes: ", navItems.childNodes.length); // how many ordered lists? var orderedLists = document.getElementsByTagName("ol"); console.log("Ordered lists: ", orderedLists.length); // narrowing down the links further - use another element, not the whole document. var myLinks = navItems.getElementsByTagName("a"); console.log("Links in navItems: ", myLinks.length); // or even combined var x = document.getElementById("mainNav").getElementsByTagName("a"); console.log("Links in mainNav: ", x.length);