BLOCK REFERENCE / DEBUG

Debug

Console messages and debugging tools.

4 blocks

Breakpoint

Actiondebug_breakpoint
Breakpoint

Writes a Breakpoint line with the object's name to the Console panel.

Despite its name, it does not pause the game: the script keeps running. It only marks that execution reached this point.

Draw Debug Line

Actiondebug_draw_line
Draw Debug Line

Draws a thin green line between two points for one frame.

The line disappears after the frame, so put the block inside On Update to keep it visible. It follows the camera like the rest of the world.

FieldWhat it means
X1numberStart X in world pixels.Default: 0
Y1numberStart Y in world pixels (Y grows downward).Default: 0
X2numberEnd X in world pixels.Default: 100
Y2numberEnd Y in world pixels.Default: 100
X1socketStart X in world pixels.Default: number, any
Y1socketStart Y in world pixels (Y grows downward).Default: number, any
X2socketEnd X in world pixels.Default: number, any
Y2socketEnd Y in world pixels.Default: number, any

Example Draw a line from this object to the mouse to check an aiming direction.

Draw Debug Text

Actiondebug_draw_text
Draw Debug Text

Draws small green text at a world position for one frame.

The text disappears after the frame, so use it inside On Update to keep it on screen.

FieldWhat it means
TexttextText or value to draw. Plug in any block to show its current value.Default: Debug
XnumberX position in world pixels.Default: 0
YnumberY position in world pixels, where the text's baseline sits (Y grows downward).Default: 0
TextsocketText or value to draw. Plug in any block to show its current value.Default: string, number, boolean, any
XsocketX position in world pixels.Default: number, any
YsocketY position in world pixels, where the text's baseline sits (Y grows downward).Default: number, any

Print

Actiondebug_print
Print

Writes a message to the editor's Console panel.

The line looks like [PyBlocks Debug] ObjectName: message. In an exported game there is no console, so nothing is visible to players.

FieldWhat it means
MessagetextText or value to print. Plug in any block to print its current value.Default: Hello Debug
MessagesocketText or value to print. Plug in any block to print its current value.Default: string, number, boolean, any

Example Print Get Variable hp every time the player is hit to check the damage math.