NativeScript Core


Logging to the console does not require the console module since the console variable is global. It can be used anywhere within your code. You can log your message in several different categories.

iOS Speicifics: On iOS the logging is enabled only in debug and will not work in release.


Common log operations through the console.

console.log("NativeScript Playground!");
console.log({ objProp: "I am Object!" });"NativeScript Rocks!");
console.warn("Low memory");
console.error("Uncaught Application Exception");

Measuring time intervals with time and timeEnd methods.

// Begins counting a time span for a given name (key).
// Ends a previously started time span through the time method.

Printing the stack trace through the trace method.

Improve this document

Demo Source