Using Platformio within VsCode on Windows with an Arduino MKR NB 1500. After “upload and monitor” the monitor always fails with:
could not open port 'COM6': could not open port 'COM6': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2) The terminal process terminated with exit code: 1
After setting “Reopen serial monitor delay” for up to 5 seconds, it’s clear that the attempt to open the serial port is always immediate after the upload ends. In which case the device isn’t ready yet and the port fails. Closing the terminal and restarting a new monitor works, but misses the first several seconds of log output from the device (plus it’s an awkward dance for what is otherwise such a polished tool).