HISE Docs

Console


The Console object allows you to print any value to the console of HISE .

Console.print("Hello World " + 3.4); // Prints "Hello World + 3.4 to the console.

Console.assertEqual(x, y); // You could write assertion tests to check your code. 

Console.start(); // You can benchmark your scripts Compile-time with:
Console.stop(); // wrapping these two Console commands around your code.


Class methods

assertEqual

Throws an error message if the values are not equal. Edit on GitHub

Console.assertEqual(var v1, var v2)



assertIsDefined

Throws an error message if the value is undefined. Edit on GitHub

Console.assertIsDefined(var value)



assertIsObjectOrArray

Throws an error message if the value is not an object or array. Edit on GitHub

Console.assertIsObjectOrArray(var value)



assertLegalNumber

Throws an error message if the value is not a legal number (eg. string or array or infinity or NaN). Edit on GitHub

Console.assertLegalNumber(var value)



assertNoString

Throws an error message if the value is a string. Edit on GitHub

Console.assertNoString(var value)



assertTrue

Throws an error message if the condition is not true. Edit on GitHub

Console.assertTrue(var condition)



Sends a blink message to the current editor. Edit on GitHub

Console.blink()



breakInDebugger

Throws an assertion in the attached debugger. Edit on GitHub

Console.breakInDebugger()



clear

Clears the console. Edit on GitHub

Console.clear()



print

Prints a message to the console. Edit on GitHub

Console.print(var debug)



startBenchmark

Starts the benchmark. You can give it a name that will be displayed with the result if desired. Edit on GitHub

Console.startBenchmark()



stop

Causes the execution to stop(). Edit on GitHub

Console.stop(bool condition)



stopBenchmark

Stops the benchmark and prints the result. Edit on GitHub

Console.stopBenchmark()