Even now that we have Raspberry Pis available I do my code development and initial debugging on a desktop. I then transfer the code to a Raspberry Pi where I complete any final debugging*. This may have to be done with the actual robot sensors and actuators. Sometimes this can be done with the robot on a teststand. Sometimes it will require that the robot be operating in its real world environment. An intermediate stage of debugging may be possible with a Raspberry Pi in a Pi-Top or similar prototyping environment.**
* To the degree that debugging is ever final. Really, we simply continue to debug until we have a software package that meets our basic needs. It's never fully debugged.
** The Pi-Top  has been useful for this but is limited to Raspberry Pi 3s.