.Debugprint Method

Top  Previous  Next

 

Function:

Sends (prints) a string into TIDE's Output pane.

Syntax:

sys.debugprint(byref str as string)

Returns:

---

See Also:


 


Part

Description

str

The data to send.

Details

This method allows you to trace the execution of your application by printing messages in the output pane of TIDE.

The method only works when the sys.runmode=1- PL_SYS_MODE_DEBUG. Is is ignored when the application is compiled for release.

Note that sending debug messages significantly slows down the execution. The VM sends a message and pauses. TIDE then sends a command to resume the execution. A single message can introduce a delay in the hundreds of milliseconds.

 

TIDE doesn't automatically print each new message on the new line. Add CR/LF to you message to achieve this:

 

Tibbo BASIC:

...
sys.debugprint("Point 1 reached"+chr(13)+chr(10)) 'one way to add CR/LF
...
sys.debugprint("Point 2, x="+str(x)+"\x0D\x0A") 'the second way to add CR/LF; this also demonstrates how the current value of some variable may be sent as well
...