#Debug Object

Lets you more easily debug your programs.

Methods

Method Assert ( test As Boolean, Optional message As String )
Causes the debugger to stop execution, only if test is false. If test is false and message is not supplied, then the output includes the supplied expression code. But, if you supply message, then that shows when test is false.
Method Log ( message As String, Optional level As LogLevels = ALL )
Writes information to the log file. But it is ignored if level is below the level set with LogLevel. The information includes the supplied message, the source file name, the line number, and the nearest named scope.
Method LogLevel ( level As LogLevels )
Sets the minimum risk level to record information to the log. Values for level include ALL (default), INFO, WARNING, ERROR, and FATAL. Calls to the method Log that are below the given level do not record information to the log.
Method Print ( message As String )
Method PrintLine ( message As String )
Shows some text in the debugger. Typically this is the value of a variable, to make sure it is correct.
Method Stop
Causes the debugger to stop execution, almost the same as a breakpoint.

Instructions

Only debug builds cause #Debug to operate fully. Release builds ignore #Debug, the same as a comment.

Examples

TODO

See also