With the Serial Monitor open in a running sketch, I can not upload another sketch without first closing the running sketch. I get the following errors:
avrdude: ser_open(): can't open device "\.\COM4": Access is denied.
Upload error: Error: 13 INTERNAL: Failed uploading: uploading error: exit status 1
In the previous versions of the IDE, I could have one sketch running with Serial Monitor open, and upload another sketch when I had the data I needed from the first sketch. However, in 2.0 beta, it's not possible if Serial Monitor is open in a running sketch., it results in a failed upload with the above error messages.
The only way I can upload the second sketch is to completely close the first sketch.
This is most annoying, and I've had to go back to the previous version of the IDE until this issue with 2.0 beta is corrected.
Are you running Windows? I generally have several sketches is open concurrently each connected to a serial monitor without any problems. I select the sketch and upload code without any problems with the appropriate IDE. I have been doing this for years. Currently I am using Arduino 1.8.13 IDE operating under Linux Mint! To keep from getting confused I generally place each sketch, and monitor window in a different workspace.
Hi @Azerla. The Arduino IDE developers are tracking this problematic user experience here:
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.
Yes I'm running Windows 10, but I posted the issue here as it appeared to be the forum for matters pertaining to IDE 2.0 beta. I used IDE 1.8.13 with no problem, but when using 2.0 beta I get the originally posted issue.