Is it possible to configure "platformio monitor" options from platformio.ini?

I’d love to be able to add a couple lines to my platformio.ini file like:

monitor_port = /dev/cu.wchusbserial1424120
monitor_speed = 9600

To configure “platformio device monitor” on a per-target basis. I can’t see any way to do this now…

Good idea. Please open a feature request here Issues · platformio/platformio-core · GitHub

Dear,

How can I set default PORt for monitor (I use a VM which have a hidden COM port in device manager)
So I always need to start Monitor with COM1 then CTRL+C and manually change COM3

[https://github.com/platformio/platformio-core/issues/787](Feature Request: Configure "platformio device monitor" from platformio.ini · Issue #787 · platformio/platformio-core · GitHub)

Thanks!

See Redirecting...

pio device monitor -p COM3

Dear Ivan,

This is a workaround.

Question 1 :
I would like to have a quicker way to start Monitor.
I just want to start Monitor with a Function key or a Button on the toolbar which can run "pio device monitor -p COM3"
Is it possible?

Question 2 :
As Monitor and Upload use the same port, Upload will toggle the monitoring.
Monitor active --> start UPload --> Toggle Port COM3 and Monitor will stop --> Upload finished --> Monitor is reactivated.
Unfortunately, it restart Monitor with COM1. I need to CTRL+C and reselect COM3.

That is why I prefer to define the default COM for Monitor or have a keyboard shortcut

Thanks

Do you use the latest version of PlatformIO IDE?

Yes, Freshly installed.