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. public static void trace(...external messages) public static void trace(...System.Object messages) Usage public static void trace(...external messages) public static void trace(...System.Object messages) Parameters messages The message(s) to trace. 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. 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 1234567import System; var a = 1;var b = "My message.";Console.trace(a); // example.js++:5:0: 1Console.trace(b); // example.js++:6:0: My message.Console.trace(a, b); // example.js++:7:0: 1 My message. Basic Usage 123import System; Console.trace("My message."); // example.js++:3:0: 1 Printing Integer Values 12345import System; int x = 1, y = 2;Console.trace("x =", x); // example.js++:4:0: x = 1Console.trace("y =", y); // example.js++:5:0: y = 2 Share HTML | BBCode | Direct Link