Files
NativeScript/apps/tests/console.md
Erjan Gavalji f15f283c74 Reorder test file structure to match the modules
Needed to have a nice structured cookbook dir in the docs

Includes:
Move the data-module tests under the data dir
Move the frame tests under the ui dir
Rename the dialog.md file to dialogs.md
Fix the web-view title
Add previous_url attributes to each article for SEO
Rename the style dir to styling to match the reference
Fix the frame-tests path
2016-05-05 10:43:35 +03:00

35 lines
968 B
Markdown

---
nav-title: "console How-To"
title: "console"
description: "Examples for using console"
previous_url: /ApiReference/console/HOW-TO
---
# Console
### Logging
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.
<snippet id='console-log'/>
### Time
Begins counting a time span for a given name (key).
<snippet id='console-time'/>
Ends a previously started time span through the time method.
<snippet id='console-timeend'/>
### Assert
Asserts a boolean condition and prints a message in case the assert fails.
<snippet id='console-assert'/>
### Dir
Prints the state of the specified object to the console.
<snippet id='console-dir'/>
### Dump
Prints the state of the specified object to the console.
<snippet id='console-dump'/>
### Trace
Prints the current stack trace in the console.
<snippet id='console-trace'/>