.debugprint Method


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


sys.debugprint(byref str as string)



See Also:





The data to send.


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. It 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.

With the introduction of wireless debugging on the WM2000, you also need to take into account performance degradation due to UDP communications over Wi-Fi. If you have a significant amount of debug messages, TIDE must wait for replies from your device for each one, which can lead to slow performance.

TIDE doesn't automatically print each new message on the new line. Add CR/LF to your 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