Hi @Azerla . The Arduino IDE developers are tracking this problematic user experience here:
opened 02:16PM - 31 Oct 21 UTC
closed 05:55AM - 08 Jun 22 UTC
topic: documentation
conclusion: resolved
topic: code
type: imperfection
topic: serial monitor
criticality: medium
## Describe the bug
It is not uncommon for a user to have multiple windows op… en with the same port selected in each. If the Serial Monitor is open in one of those windows, uploads from the other window will fail.
## To Reproduce
1. Connect any Arduino board to your computer.
1. Select the board and port in the Arduino IDE menus.
1. Open Serial Monitor (e.g., **Tools > Serial Monitor**).
1. Select **File > New** from the Arduino IDE menus.
1. Select **Sketch > Upload** from the Arduino IDE menus.
🙁 Note that the upload has failed with an error something like "`avrdude: ser_open(): can't open device "\\.\COM7": Access is denied.`"
## Expected behavior
Handle sharing port usage between windows automagically.
**OR**
More effectively communicate the cause of the upload failure and the required action to the user.
**OR**
Clearly document the cause of the upload failure and the required action (https://github.com/arduino/arduino-ide/issues/271).
I would recommend taking the approach of *"so you have x problem, here is the solution ..."* rather than *"here is how to upload/use Serial Monitor properly ..."*. The reason is that the user is much more likely to go searching for a specific solution once they have the problem than to proactively study the documentation in advance of doing an upload.
With this approach, the appropriate location for the documentation would be [the Help Center](https://support.arduino.cc/hc/en-us/sections/360003198300). The [classic Arduino IDE points the user there](https://github.com/arduino/Arduino/blob/1.8.16/arduino-core/src/cc/arduino/packages/Uploader.java#L179) in the event of a failed upload.
The article should be titled with the unique components of the various common error messages that occur when attempting to upload to an open port. It should also take into account that there are multiple possible causes of this error.
## Desktop
- OS: Windows 10
- Version: 2.0.0-beta.12-nightly.20211028
Date: 2021-10-28T03:03:25.353Z
CLI Version: 0.19.1 alpha [718bbbf2]
## Additional context
Originally reported at https://github.com/arduino/arduino-ide/issues/271#issue-840803269
### Comparison to classic Arduino IDE
This is not usually a problem in the classic Arduino IDE because all windows share the same Serial Monitor and are able to juggle the control of the port between the upload process and Serial Monitor automagically.
The exception is when the user has opened multiple instances of the Arduino IDE, in which case it behaves the same as Arduino IDE 2.x in that each instance has its own Serial Monitor and can not control the Serial Monitor of the other instance. However, this multiple instance usage is not very common, and more often employed by advanced users who are easily able to identify the cause of the upload failure that results from these conditions.
If you have a GitHub account, you can subscribe to that issue in order to get notifications of any developments.
Arduino IDE 2.x works differently than the classic Arduino IDE in this respect. The classic Arduino IDE actually has the same behavior when you use multiple instances of the IDE.
When you only have a single instance of the classic Arduino IDE running, every window of that instance shares the same board and port setting, meaning you end up switching those settings a lot if you are working with multiple boards at the same time. That is not a problem with Arduino IDE 2.x because every window is a separate instance.