Debug Block

because.blocks command block guide

What is the Debug Block?

The Debug Block is a mini command block for because.blocks. You type commands into its editor, then activate it by clicking it, selecting it and pressing Activate, wiring another block into it, or triggering it with a key/wire setup.

Good first test: place a Debug Block, double-click it, type tone:660, press Apply, then click the block.

Setup

Choose Debug Block from the Block Type dropdown.
Place it on the grid.
Double-click it to open the editor.
In Display Text / Channel / Debug Command, type a command.
Press Apply, then click or activate the block.
Browser TTS/audio may need one real click on the page before sound works.

Basic Commands

say:text

Shows text in the status bar.

say:debug works

toggle

Toggles the Debug Block on/off.

toggle

activate

Activates blocks wired from the Debug Block.

activate

Movement Commands

move:direction

Moves the Debug Block or its glued group one step.

move:right
move:left
move:up
move:down

powerMove:direction:amount

Moves multiple steps. Great for launch tests.

powerMove:up:4
powerMove:right:6

spin

Rotates a glued group clockwise if the v0.6 wheel system exists.

spin

spinleft

Rotates a glued group counter-clockwise.

spinleft

Sound and TTS

tone:pitch

Plays a note. Higher pitch means higher sound.

tone:220
tone:440
tone:660
tone:880

tts:text

Speaks text using the browser voices. It tries to pick a Sam-like voice when possible, but the exact voice depends on the device/browser.

tts:hello because blocks
The tone command can sound like a tiny music-box note, which is normal.

Machine Commands

clone

Clones the Debug Block in its selected Direction.

clone

explode

Destroys nearby blocks using the Debug Block’s Radius value.

explode

activate

Useful when the Debug Block is wired to Note Blocks, Display Blocks, Timers, or Explosions.

activate

Combo Examples

Multiple commands can be run by separating them with commas.

Debug Greeting

tone:660, tts:debug block activated, say:complete

Launch Test

powerMove:up:4, tone:880

Wire Trigger

activate, say:wires activated

Spin Test

spin, tone:440

Chaos Button

tts:uh oh, explode

Talking Machine

tts:i am a machine, move:right, tone:660

Tips

Use wires

Wire a Button Block to a Debug Block to make a command button.

Use glue

Glue the Debug Block to a body, then use move or powerMove to move the whole group.

Use Radius

The explode command uses the Radius editor value.

Use Direction

The clone command uses the Debug Block’s Direction value.

Use Pitch

If tone has no number, it can fall back to the Pitch editor value.

Keep commands simple

If a command fails, test it alone before adding it to a combo.