With the WPILib extension, the functionality is added to simulate robot code without having an actual robot to test your code with. Definitely read WPI’s Intro to Robot Simulation
SmartDashboard allows you to read data from your code:
SmartDashboard.putNumber("Bus Voltage", busVoltage);