How do you test Arduino sketches before uploading them to hardware?

I’m curious how other Arduino users test their sketches before uploading them to the board. For small projects, I usually just upload and check the Serial Monitor, but this becomes a little inefficient as the code gets larger.

Do you have a preferred workflow for checking logic, testing different inputs, or catching simple mistakes before flashing the board? I’d also be interested in hearing whether anyone uses simulation tools or other IDE features as part of their normal development process.

Three ways that I use as a mediocre tinkerer...

  1. wokwi.com - mostly (if wokwi server isn't bogged down)
  2. Substitute Serial.print() for pin commands.
  3. LED+resistor for "seeing" output