Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Debugger

Alan Yorinks edited this page Nov 17, 2015 · 6 revisions

Snap! tab location: Sensing tab.

This reporter block displays the last error reported by any of the s2aio programming blocks.

For Scratch

There is a small check box next to the debugger block on the blocks palette. Check the box, and the debugger value will be displayed on the Scratch Stage.

For Snap

Snap! does not offer a check box, so the block can be placed in a loop or tested with an if/then statement block for error.

Error codes are shown for each block on their description pages.

A full list of error codes can be found here.

Using the Debugger Block

Each time an s2aio block is executed, the Debugger value is set to 0 and if any errors are encountered the Debugger value is updated with the error code. So if you have two sequential blocks executing, and the first has an error condition, the error code will be overwritten when the second block executes.

If your script is not working as expected, to use the Debugger block, you may need to separate your blocks and execute them individually to find the error. You can add your blocks one by one, back to the script until you are satisfied all blocks are operating without any detected errors.