-
Notifications
You must be signed in to change notification settings - Fork 2
Setting Up Robot Debugging
This guide explains how to configure the Eclipse debugger so that you can debug the robot code in the simulator and on the RoboRio. The configurations we'll make are specific to a given robot; you'll have to repeat this guide for each robot you want to debug.
First, we need to create build configurations that start the code in debug mode.
- In Eclipse, click the black down arrow next to the play-button-with-a-toolbox on the top bar, and click "External Tools Configurations..." on the menu that appears.
- Right-click on your <robot name> Deploy configuration and click Duplicate.
- Rename the new configuration to "<robot name> Deploy Debug".
- With the new configuration selected, go to the Targets tab, uncheck
deploy
, and checkdebug-deploy
. - Hit the Apply button
- Following the same process, duplicate your "<robot name> Emulator" configuration and select the
debugemulator
target.
Next, we need to tell the IDE how to connect to the debugger.
- Click the black down arrow next to the bug on the top bar, and click on "Debug Configurations..."
- Right-click on
Remote Java Application
in the left pane, and click New - Name the new configuration "<robot name> Debug Connect"
- Click on Browse next to the project box, then select the project for the robot (not the common library project)
- In the Host box type
roborio-3128-frc.local
, and in the port box type8348
. Check the "Allow termination of remote VM" box. - Hit Apply.
- Create a new Remote Java Application configuration called "<robot name> Emulator Debug Connect"
- Select the robot project again
- Leave the Host at
localhost
, but change the Port to5433
. Again, check the "Allow termination of remote VM" box. - Hit Apply, and close the dialog box.
To use the configurations, run them once from the Debug Configurations menu, and they'll start appearing in the Debug Configurations pulldown menu. Note that when you debug the simulator, for some reason it loves to appear behind Eclipse, so you may have to go searching for its dialog box.
Getting Started Guides:
Student
Mentor
Technical Resources:
Mechanical
Controls
Strategy
Fundraising
Team Policy:
Member Contract
Attendance/Workshop Hours