Stepping Through a Project in VEXcode VR using VIQC Pitching In

The Project Stepping feature provides the user with important visual that help users to troubleshoot or better understand a project's flow. When a project is run, Fling the Hero Bot will run as instructed, but it may not be how the user intended. Having the ability to see the blocks being executed one step at a time gives the user a better visual of which blocks may be causing the error.


How to Use the Project Stepping Feature

A close up screenshot of the upper right hand side of the VEXcode VR Toolbar, with the Step button highlighted, directly to the right of the Start button.

Select the step button located at the top right of the VEXcode VR toolbar.

VEXcode VR project open with the Step button highlighted for running blocks one at a time

Once selected, a green highlight will appear around the {When started} block to indicate where the program is beginning, and then immediately moves 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.

Note: the highlight will immediately move past a [Comment] block, because [Comment] blocks do not change the project or blocks surrounding it.

VEXcode VR project showing Drive for, Turn for, and Drivetrain blocks used in the VIQC Pitching In Playground

Select the step button again to run the block that is highlighted. Once the block has been executed, the next block will become highlighted.

Continue to use the step button to run through the project one block at a time.


Debugging with the Project Stepping Feature

VEXcode VR project with blocks to collect a ball with the intake and turn and score the ball, with a turn block highlighted, showing the mistake in the project.

The Project Stepping feature slows down the flow of the project and provides immediate visual feedback. 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 Fling to intake a Ball and score the Ball in the High Goal. However the turn in the project is turning in the wrong direction, and thus the Ball will not be scored in the High Goal.

Coding error highlighted in a VEXcode VR project in the VIQC Pitching In Playground

Incorrect code logic shown while stepping through a VIQC Pitching In project in VEXcode VR

Run the project step by step using the Project Stepping feature until a mistake is observed.

The same project as the one previous, now with the direction dropdown of the turn block open, and left selected, showing how to fix the problem.

The same project with the turn block now reading to turn right for 155 degrees in the section of the project to turn and launch the ball into a high goal.

Correct the mistake.

The mistake in this example was that Fling was coded to turn left 155 degrees, however this direction does not put Fling at the correct angle for the Catapult to shoot the Ball into the High Goal. The turn direction should be changed from left to right.

VEXcode VR block project for stepping through a VIQC Pitching In program in the workspace

VEXcode VR project open in VIQC Pitching In for stepping through code execution

Then run the project again from the beginning using the Project Stepping feature. Repeat this process until the project runs correctly.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: