Using for wireless comunication, SPI is needed.
Or use an "emulation processor" (ie. one in bigger package) and a reduction pod. You may then need to remap the SPI to other pins, and maybe other remaps, so it's not a 1:1 emulation, but may be a useful approach if extensive debugging is needed.
Use the good old staring at the code.
Blink LEDs, excercise pins observed by LA/oscilloscope, use externally connected device to output debug messages.
Or, if it's applicable in your case, use another SPI with slave select (i.e. multiple slaves on one line).
On a device without debug support, I used to write a number of pulses to a GPIO pin (actually the TX pin of a slow-speed UART line) at max speed.
This requires a scope for debugging, but can output several states in chronological context.
I select STM32L011F3 for design， then replace it.
Or as far as I can see, USE a software controlled SPI.
Retrieving data ...