Stepping Through a Project in VEXcode GO

The Project Stepping feature offers the user a way to see the execution of a project block by block. These visual cues can be used to help students troubleshoot, or to better understand a project’s flow. When a project is started, the robot will perform the project as instructed, but it may not be how the user intended. Having the ability to see the blocks being executed one at a time gives the user a better visual of which blocks may be causing the error, so debugging can become a more targeted and efficient process.

The following article will cover:

  • How to Use the Project Stepping Feature
  • Debugging with the Project Stepping Feature

Note: This article uses the Code Base configuration in VEXcode GO. See the Configuring a VEX GO Code Base Knowledge Base article for more information about how to configure a Code Base in VEXcode GO.


How to Use the Project Stepping Feature

In order to use the Project Stepping feature in VEXcode GO, the Brain must be connected to your tablet or computer, and VEXcode GO should be configured for your build.

Select the Step button located at the top right of the VEXcode GO toolbar.

step_button.png

Once selected, a green highlight will appear and flash around the {When started} block to indicate where the program is beginning, and then immediately movs to highlight the first block in the stack. The highlight will stay on the first block after {When started} until the Step button is selected again.

highlight_first_step.png

Select the Step button again to start the block that is highlighted. The highlight will flash as the block is executed. Once the block is complete, the next block will become highlighted, indicating that it is ready to run the next command when the Step button is selected again.

highlight_second_step.png

Continue to use the Step button to execute the project one block at a time. When stepping through a project, selecting the Start button will cause the rest of the project to execute at full speed. This can be helpful if you want to step through the first few blocks of a project, but then carry out the rest of the project as it is written.


Debugging with the Project Stepping Feature

The Project Stepping feature slows down the flow of the project and provides direct visual feedback on what the robot is doing at each block in the project. This allows the user to go through the project one block at a time to observe behavior and correct mistakes.

In this example, the intention is for the Code Base to drive in a square (drive forward for 500 millimeters (mm) and turn right 90 degrees, 4 times to create a square). However, there is a wrong turn in the project.

wrong_turn.png

Use the Project Stepping feature to start and execute the project step by step until a mistake is observed.

wrong_turn_project.png

Correct the mistake.

correct_the_mistake.png

corrected_block.png

Then select the Stop button, and use the Step button to start the project again from the beginning, using the Project Stepping feature to observe the behavior of the robot in each block of the project. Repeat this process until the project works as intended.

completed_project.png