C++ SCHX ยท rev 4
RC Blocks Studio guide ยท Beginner

Debugging a block project

If a game stops behaving correctly, disable/remove the newest block or test a smaller stack. Small tests reveal whether the issue is the event, a value or the action itself.

14 minreading time
Beginnerdifficulty
MODU docssource
SCHX nativeruntime
SCHX / FEATURE LAYER

Shrink the problem

If a game stops behaving correctly, disable/remove the newest block or test a smaller stack. Small tests reveal whether the issue is the event, a value or the action itself.

SCHX / FEATURE LAYER

Check the event first

A perfect stack does nothing if its event never fires. Verify Green Flag, key, click, message or timer conditions before changing every action block.

blockswhen green flag clicked
when key pressed
when this sprite clicked
SCHX / FEATURE LAYER

Check values

Look for unexpected zeroes, misspelled sprite names, wrong variable names and values that are too large to see clearly.

SCHX / FEATURE LAYER

Use Advanced logging carefully

The Advanced console block can help experienced users inspect values. Beginners can usually use variable monitors or Looks text first.

blocksshow variable monitor
log value to console
SCHX / FEATURE LAYER

Related guides