trace

Summary

Writes a line to standard output, with the source location printed.

Signatures

Click on a signature to select it and view its documentation.

Usage

public static void trace(...external messages)

Parameters

messages

The message(s) to trace.

Description

Writes a line to standard output, with the source location printed. The output will be printed in the following format:

filename:line:col: message

If the filename is non-unique, the full path will be outputted.

If there is more than one trace statement, they will each be written to distinct lines.

If there is no console available, this method does nothing.

Examples

Basic Usage
1
2
3
4
5
6
7
import System;
 
var a = 1;
var b = "My message.";
Console.trace(a);    // example.js++:5:0: 1
Console.trace(b);    // example.js++:6:0: My message.
Console.trace(a, b); // example.js++:7:0: 1 My message.

Share

HTML | BBCode | Direct Link