#Debug
Object
Lets you more easily debug your programs.
Methods
Method Assert ( test As Boolean, Optional message As String )
- Causes the debugger to stop the program if
test
is false. Iftest
is false andmessage
is not supplied, the output includes the supplied expression code. But, if you supplymessage
, that shows whentest
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 withLogLevel
. 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
includeALL
(default),INFO
,WARNING
,ERROR
, andFATAL
. Calls to the methodLog
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 the program, 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