Join "pio run -t upload" & "monitor -f esp32_exception_decoder"

Sorry for the primitive question, but i’m really inconvenienced by having to type in line by line
pio run -t upload
pio device monitor -f esp32_exception_decoder
Attempting to enter pio run -t upload -t monitor -f esp32_exception_decoder prompts me to read the help. Maybe there is a solution to how to combine these two actions into one line.

Well indeed

>pio run -t upload -t monitor -f esp32_exception_decoder
Usage: pio run [OPTIONS]
Try 'pio run -h' for help.

Error: no such option: -f

The pio run command does not take a -f (filter) argument like pio device monitor does. You should put that in your platformio.ini using the monitor_filters directive. Then pio run -t upload -t monitor should work as expected.

Thanks! :bowing_man:
This works great!

;https://docs.platformio.org/en/latest/core/userguide/device/cmd_monitor.html#filters
monitor_filters = esp32_exception_decoder