Skip to content

Monitor Commands

Lewis McClelland edited this page Jul 13, 2026 · 2 revisions

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). For example, to view all connected devices, you could run monitor devices.

Utility

monitor help

Lists all monitor commands that the active version of v5gdb supports.

monitor log [level]

View or set the current log level (one of off/trace/debug/info/warn/error).

Device Access

These commands allow you to interact with the devices connected to your V5 Brain.

monitor devices

(alias dev)

Lists all connected smart devices, including their port numbers and types.

monitor ctrl [partner]

Views the active inputs from the connected controller. If multiple controllers are connected, you can view the inputs from the partner controller by specifying partner.

monitor battery

(alias batt)

Views the status of the connected battery, including temperature, voltage, current, and percent charge.

monitor stop

Immediately stops all Smart Motors connected to the robot.

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.

Maintenance

These commands allow you to perform maintenance or debugging on v5gdb itself.

monitor dbg break

Shows the internal status of software breakpoint system.

monitor dbg hw

Shows the internal status of hardware breakpoint system, including the configuration of the processor's debug subsystem.

System Access

v5gdb can interface with an RTOS to support thread-aware debugging. Depending on which RTOS is in use, different system-specific commands will be available as subcommands of monitor sys.

You can view all available system commands by running monitor sys help.

FreeRTOS

FreeRTOS is the operating system used by the PROS framework.

monitor sys tasks

(alias task, t)

Lists the details of all FreeRTOS tasks, including:

  • Id: The task's unique task ID number.
  • Name: The task's name, if configured.
  • State: The scheduling state of the task (Blocked, Deleted, Ready, Running, Suspended, or Unknown).
  • Priority: The scheduling priority of the task.
  • Stack Remaining: The stack high-water mark, formatted as the number of bytes in the task's stack which have never been used.

You can also view different information about the active tasks by using GDB's builtin info threads command.