Project debugging

Console

../../_images/13.png

The main window for displaying system information is the console. The console is a window for displaying system messages, which are divided into three different groups:

  1. Info
  2. Warnings
  3. Errors

The console is needed to display possible errors during the execution of the scenario, as well as auxiliary messages about the status of the scenario, such as the current step of the passage, the number of passed steps, points, etc.

To bring up the console, press the ~ button on the keyboard

Note

You can read more about keyboard shortcuts in the 3D editor in the related article

Also in the lower right corner of the screen is a button to call the console, which contains information about the number of messages in the console

../../_images/23.png

Displaying messages in the console

In order to call messages in the console, you must add a block that is responsible for displaying the message in the console. This block is located in group “Accessories”

../../_images/31.png

In the message output block in the console it is possible to select the type of message to be output

../../_images/41.png

Testing the console output functionality

In order to test it, we need to build a small script. The script will imply to increase the value of some variable by pressing the button and output the value to the console. To do this, you need to add a button to the scene, and in Blockly assign to pressing the button to increase the value of a variable and output a message to the console

../../_images/51.png

The result of the script after 5 clicks:

../../_images/61.png

Illumination of blocks in progress

In Blockly, you can track in real time the blocks that are currently executing. These blocks are highlighted when they are executed

../../_images/7.png

Note

You can read more about highlighting used blocks in the related article

This mechanism allows you to track logical drafting errors, track the current state of the script, transitions, etc.