In ROBOTC, users may find the need to open certain debugger windows every time the program runs. Luckily, ROBOTC has a coding option that allows users to set certain debug windows to do just that: the DebuggerWindows () pragma statement.

 

To use this feature, each window that needs opened must have its own '#pragma debuggerwindow("DebugName") ' statement prior to any other code in the program - it is recommended to place them directly under the Motor and Sensors Setup pragma statements.

 

For instance,

#pragma DebuggerWindows ("Globals") 

is required to open the Global Variables window each time a program runs. For the sake of program organization, these pragma statements should be placed at the very beginning of your code, before task main() and any functions.

 

Debugger Window #pragma Statement
Call Stack
#pragma DebuggerWindows("callStack")
NXT Datalog
#pragma DebuggerWindows("Datalog")

Global Variables

#pragma DebuggerWindows("Globals")
Joystick Control - Basic
#pragma DebuggerWindows("joystickSimple")
Joystick Control - Competition
#pragma DebuggerWindows("joystickGame")
Local Variables
#pragma DebuggerWindows("Locals")
Motors
#pragma DebuggerWindows("Motors")
NXT LCD Screen
#pragma DebuggerWindows("nxtLCDScreen")
Sensors
#pragma DebuggerWindows("Sensors")
Debug Stream
#pragma DebuggerWindows("debugStream")
System Parameters
#pragma DebuggerWindows("systemParameters")
VEX LCD Screen
#pragma DebuggerWindows("VexLCD")
VEX Competition Control
#pragma DebuggerWindows("vexCompetitionControl")
 
#pragma DebuggerWindows("VexIqDeviceTable")
VEX IQ Device Driver Statistics
#pragma DebuggerWindows("VexIqDeviceTableStatistics")
Task Status
#pragma DebuggerWindows("taskStatus")
Timers
#pragma DebuggerWindows("Timers")
EV3 LCD Screen #pragma DebuggerWindows("EV3LCDScreen")