Console.log: Difference between revisions
Jump to navigation
Jump to search
Created page with "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 messa..." |
|||
Line 31: | Line 31: | ||
|console.info(object [, object, ...]) || | |console.info(object [, object, ...]) || | ||
|- | |- | ||
|console.log(object [, object, ...]) || | |console.log(object [, object, ...]) || Output a string or variable to the log. | ||
|- | |- | ||
|console.profile([label]) || | |console.profile([label]) || |
Revision as of 10:47, 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() | |
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")