In ROBOTC, there is a debugger window in which you can see the sensor values as the robot is running. You can find this window under the ‘robot’ menu. There is also a function called writeDebugStreamLine() that you can use to print things to a terminal.
The RobotC debugger is quite powerful. In addition to the debugStream and sensors windows, you can also view the control values being sent to motors and every variable you have declared. What may not be known is that you can also modify these values by typing new values into these windows, for example, you can run a motor by selecting the current value and typing in a new one (if your code is also updating this motor it won’t work).