Skip to content
Lewis edited this page Jan 24, 2026 · 17 revisions

Welcome to the v5gdb user manual! This guide will help you set up a debugger for your VEX V5 project.

Disclaimer

v5gdb is alpha software, so details are subject to change. Currently, v5gdb only supports Rust (e.g. vexide) programs, but it is being developed in a framework-independent way that will allow us to add support for C/C++ (e.g. PROS and VEXcode) later.

Getting Started

If you're new to v5gdb, please read our installation and setup guide for Rust projects.

If you'd like to try our experimental C++ support, there's an installation and setup guide for C++ projects too.

Here are some common GDB commands you may find helpful:

  • layout src will show you what code is currently running. After running the above command, focus cmd will let you use the up and down arrow keys to quickly select a previous command.
  • break fib will set a breakpoint on a function named "fib", and break main.rs:15 will put a breakpoint on line 15 of main.rs.
  • step will step execution forward by an single line of code.
  • next will step execution forward by an single line of code, and "jump over" function calls.
  • monitor help will show the special commands specific to the vexide debugger.
  • cont will exit the debug console and continue execution as normal. The debug console session will resume if a breakpoint is hit.
  • quit will quit the debugger.
  • info locals will show you the values of all the variables in the current function.
  • info args will show you the values of all the parameters passed to the current function.
  • info frame tells you what function is currently running and what file/line number you're on.
  • backtrace tells you what function called the current function, and what function called that one, and so on.
  • print can be used to print out certain variables or call functions, like this:
    • Call a function: print my_crate::calculate_number(30, 100, 4)
    • Print a variable or expression: print kp * error
  • finish will skip to the end of the current function.

Features unique to v5gdb

v5gdb includes some extensions to GDB that allow you to control some unique aspects of the V5 brain. These extensions are accessible as subcommands of the "monitor" command (which can be typed as "mon" for short.)

Competition control

You can use v5gdb to inspect or override the robot's competition state using the monitor comp command. This can be useful for testing how your robot would function in different modes outside of a real competition.

Competition state overrides do not have any effect on the restrictions imposed by VEXos when your robot is autonomous or disabled. For instance, if the competition state is actually "autonomous" but is overridden to "opcontrol", your code will not receive new data from controllers. Alternatively, if a robot is actually in the "opcontrol" state but is overridden to "disabled," it will still be able to move motors.

monitor comp:

Running the command without any arguments will show you the current competition state and any overrides you have set.

monitor comp driver | auton | disabled:

Override the current competition mode by specifying driver (or opcontrol), auton, or disabled.

monitor comp none | fc | switch:

Override the current competition system by specifying none for disconnected, fc for field control, or switch for competition switch.

monitor comp real:

Remove any overrides that you have set by specifying real.

Motor control

You can use the monitor stop command to quickly stop all motors attached to your robot.

Support

If you have questions about v5gdb, please send us feedback in our discord server.

Clone this wiki locally