Free serial port when panel of the Serial Monitor view is collapsed #2491
Labels
topic: code
Related to content of the project itself
topic: serial monitor
Related to the Serial Monitor
type: enhancement
Proposed improvement
Describe the request
When the Serial Monitor view is opened, the monitor opens the selected port. When the view is closed, the port is closed, allowing it to be used by other processes.
The bottom panel or right side panel of the Arduino IDE window serve as the containers for the Serial Monitor view.
The user can control the visibility of these panels. From a user's perspective, there isn't a significant difference between collapsing the panel in which the view is located and closing the view because either results in the visual disappearance of the view. However, there is a significant functional difference in that the port remains open in Serial Monitor when its view is collapsed. Not realizing that the port is still being used can be problematic because it blocks any other application (even including Arduino IDE's own firmware updater and upload operation in some cases) from opening the port.
🙂 A more intuitive behavior would be for Serial Monitor to close the port when the view's panel is collapsed.
Demo
A menu will appear on the editor toolbar:
ⓘ You can scroll down through the list of commands to find it or type the name in the field.
A "Preferences" tab will open in the Arduino IDE main panel.
arduino.monitor.dockPanel
in the "Search Settings" field of the "Preferences" tab.ⓘ The behavior is not specific to the right panel, but the demo is more compelling in this configuration. The reason being that the right panel is only used for the Serial Monitor view and its toggle control is very discoverable, so the user is likely to collapse the right panel during normal use. Conversely, since the bottom panel is also the container for the frequently used "Output" view, and since its primary toggle control is less discoverable, the user is less likely to ever collapse the bottom panel.
The Serial Monitor view opens in the right side panel.
The right side panel collapses, making the Serial Monitor view no longer visible.
ⓘ You can use
arduino cli monitor
for this purpose, the Arduino IDE 1.x Serial Monitor, a standalone terminal emulator like PuTTY, or whatever else you have on hand.🙁 The other application can't open the port.
The right activity bar disappears.
😕 The application is now able to open the port.
Note that these two icons are very similar, and adjacent, yet have very different functions. The difference between the two is not well communicated to the user:
Arduino IDE version
aa9b10d
Operating system
Operating system version
Additional context
Originally reported by @mjs513 at https://forum.arduino.cc/t/should-we-still-report-and-check-for-semi-minor-issues-and-annoyances/1290531/9
Issue checklist
The text was updated successfully, but these errors were encountered: