Logo
  • Features
  • Educators
  • What's New
  • Blog
  • Showcase
  • About us
  • Contact
Try it now!

How to trace the changes of a variable within an algorithm? | Debug Techniques

Debugging is the process of identifying and removing defects you find in your program.

Debugging in Scratch is extremely difficult. In most modern IDEs, one technique to monitor programs in real-time debugging is known as “tracing”, which involves a specialized use of logging to record information about a program’s execution.

Tracing variables

In the screenshot below, the left side shows a simple algorithm with a loop within another loop. This example demonstrates a situation where bugs might easily occur.

image

With Gandi Terminal, you can trace the changes of variables, as shown on the right, instead of guessing the value of variables or inserting a "wait" code to slow down the algorithm and watch each variable's value. Moreover, each message can be set to a different color to help you identify the error.

Extensions Mentioned

TerminalTerminal
Logo

Designed by 2ndR with love

Discord