RobotC and Debugging
software/
NXT Repository/Tutorials/

Here’s something I got from Dick Swan, the developer of RobotC:
Debugging your programs is always a challenge on the NXT. ROBOTC is one of the few programming solutions for the NXT that offer a traditional run-time “debugger” capability. It’s usually a lot easier to correct programs with a debugger rather than manually inserting “print” or “display” statements in your program to try to figure out what’s wrong.
The capabilities of a run-time debugger can be shown using the ROBOTC solution. The PC screen shot above illustrates several of debugger features
With the ROBOTC debugger you can:
- Start and stop your program execution from the PC
- “Single step” through your program executing one line of code at a time and examining the results (i.e. the values of variables) the flow of execution.
- Define “breakpoints” in your code that will cause program execution to be suspended when they are reached during program execution
- Read and write the values of all the variables defined in your program
- Read the write the “values” of motors and sensors as your program is executing.
- Remote the NXT LCD and buttons to your PC desktop.
For more details on the features of the ROBOTC debugger, open this file.
PERSONAL NOTE: The free NXC/NBC also has a real-time debugger. But they have different feature sets and capabilities. Maybe John Hansen can shed more light on this issue?