For some reason, when I run simulation on the team’s primary programming computer (which we got in 2023) and click on the restart
or hot code replace
buttons, the simulation just restarts without changing any of the code. The real problem with this, however, is that the simulation runs fine on every other computer I have tested with so far. I have tried reinstalling WIPLib, VSCode, and FRC Game Tools and there was no change to the behavior. Does anyone know of any recent dependencies that might have broken the simulation?
Reproductions is as follows (if your computer so happens to have the same error)
- Make (or open) a WPILib 2024 project
- Make a quick print statement in robotPeriodic to say something, let’s go with “Hello World” for this example.
- Run your simulation. Wow, that’s a lot of prints. Let’s get them out of here!
- Remove the print statement from the code without stopping the simulation
- Click hot code replace. If your computer is having the same problem as mine, then it should say in the bottom right “Cannot find any changed classes for hot replace!” Okay, well if that doesn’t work, surely restarting the simulation (without clicking the stop button, I’m talking about that little green arrow to the left of it)
- Restart the simulation. We got the whole restarting message, and the prints might have stoppe-- oh the print statements are back. Hello World!