Is it possible to compile but to suppress upload?

I just want to generate .hex file and .o files for a debugger. Is there a way to perform a compile but not upload to a board?

Of course, just run pio run and follow to .pioenvs directory.