Console.log: Difference between revisions
Jump to navigation
Jump to search
Line 43: | Line 43: | ||
|console.timeStamp([label]) || | |console.timeStamp([label]) || | ||
|- | |- | ||
|console.trace() || | |console.trace() || Shows a stack trace. See what function you are coming from. | ||
|- | |- | ||
|console.warn(object [, object, ...]) || | |console.warn(object [, object, ...]) || |
Revision as of 10:49, 8 October 2013
console.log(message)
Description
Console.log outputs text to the debugger's console. If you run your app with the debugger's console window open, you can see the message as your program runs. This is useful for tracing program execution, checking variable's value during execution and for timing.
Here are related console commands:
console.assert(expression, object) | |
console.clear() | |
console.count(label) | |
console.debug(object [, object, ...]) | |
console.dir(object) | |
console.dirxml(object) | |
console.error(object [, object, ...]) | |
console.group(object[, object, ...]) | |
console.groupCollapsed(object[, object, ...]) | |
console.groupEnd() | |
console.info(object [, object, ...]) | |
console.log(object [, object, ...]) | Output a string or variable to the log. |
console.profile([label]) | |
console.profileEnd() | |
console.time(label) | |
console.timeEnd(label) | |
console.timeStamp([label]) | |
console.trace() | Shows a stack trace. See what function you are coming from. |
console.warn(object [, object, ...]) |
Example (Basic)
Rem console.log ChangeForm(Form2) 'go to next form without transition Function Form1_onhide() MsgBox "Old Form Hidden" End Function Function Form2_onshow() Msgbox "Show form " & NSBCurrentForm.id End Function
Example (JavaScript)
//ChangeForm sample call ChangeForm(Form2); //go to next form without transition Form1.onhide = function() { alert("Old Form Hidden"); } Form2.onshow = function() { alert("Show form " + NSBCurrentForm.id); }
Output
(msgbox showing "Old Form Hidden")
(msgbox showing "Show form Form2")