Home > Language Reference > Statements
DebugPrint Statement
Displays a message in the output window of the debugger.
Syntax
DebugPrint Message
| Parameter | Description |
| Message | Message to display in the output window of the debugger. |
Remarks
Calling this statement displays a string in the "Debug" tab of the HB++ Output window. If the debugger is not active and the application is running on Palm OS® Emulator, a dialog box is displayed. If the debugger is not active and the application is running on a handheld device, a fatal exception occurs requiring the handheld device to be reset.
This instruction is ignored if the "Project > Settings > Generate debug info" option is not set when the project is compiled.
This statement is useful to debug programs, in situations when you cannot use breakpoints. A typical example is to monitor the variable values from a PenDown or PenMove event: a breakpoint in one of these event handlers modifies the succession of events raised and notably prevents reception of the PenUp event. Another example is a program that uses timers with short intervals: a breakpoint prevents Timer events to occur at the specified interval.
Private Sub Form_PenMove(ByVal x As Integer, ByVal y As Integer) if x>20 then DebugPrint "PenMove at x=" & x & " , y=" & y End Sub
Note: message length can not exceed 128 characters. A message that exceed 128 characters will be truncated.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |