Serial Monitor issues hopefully fixed before Release

I know there are already several issues in the github project that are associated with the Terminal monitor, but I keep hoping that many of them will be addressed soon. At least hopefully before the first real (i.e. not RC) release.

Mouse/Keyboard Navigation:
For me, probably the biggest issue has to do with the lack of decent keyboard (and mouse) navigation within the Serial monitor. Should work at least as well as the Output window. (I know there are open bug reports)

Clipboard:
Related to this has to do with trying to copy stuff to the clipboard. I use that a lot when I need to fill in things like forum posts. But also, I often times I do a select all, copy and then paste into an editor window that I can search for information. Currently (at least in 9.2) this is severely busted, especially if the window scrolled during the selection process (I know there is at least one open bug report on this)

Keeping track of the connected Serial
I could be wrong, but it feels like the new nightly builds (after RC9.2), that the system loses tract of which Serial port that is connected, especially if you turn it on after you start the IDE.

Example:


It is showing that I am not connected, yet I can type and hit CTRL+enter and it works, and you can see it is outputting to the window.

Also, the drop down is showing that COM27 is the MicroMod
Although again if I look at the Ports Menu it knows about: it

Again, my gut may be wrong, in that the newer daily builds loses the context of which Serial port is active more than 9.2, but I see it more when I end up using something like TyTerminal instead of the IDE.

Wish List

  1. Wish that if the Serial monitor Window has the active focus, that I can simply type Enter key instead of needing to type CTRL ENTER

  2. Wish that the Serial monitor could be un-docked! I don't get why the Serial Plotter is undocked but Serial monitor is Docked.

Sorry, I know most/all of these things have been covered in the Issues in Arduino IDE, but thought I would post, just in case some of them may have fallen through the cracks.

My gut says that maybe Arduino IDE 2 is close to first release and hoping a few more things get fixed like the magical moving text cursor I reported earlier today.

Thanks @KurtE!

What do you mean by "navigation"? Is it about selecting text in the output?

In order to make all relevant information available to any who are interested in this subject, I'll share a link to the related report here:

Although you specified "select all", there are also some bugs when attempting to select specific sections of the Serial Monitor output tracked here:

In order to make all relevant information available to any who are interested in this subject, I'll share a link to the related report here:

In order to make all relevant information available to any who are interested in this subject, I'll share a link to the related report here:

The current Serial Monitor GUI should be thought of as a "placeholder". It was implemented in the very early phase of development where the entire project was essentially a "proof of concept".

Serial Plotter was implemented much later and a lot of careful design work occurred before any code was written.

The Serial Monitor will be completely reworked, following the same process that produced Serial Plotter. The design work is already done, but the development resources have not yet been allocated to the implementation, as explained by the then team lead here:

https://github.com/arduino/arduino-ide/issues/289#issuecomment-1070964887

it's definitely in our roadmap and at the top of the list.

We are giving maximum priorities to bugs that compromise the standard usage, next will come performance and UX improvements, like this issue with the monitor. We already designed the new one that is gonna be a separate window like the serial plotter.

I am able to reproduce this. I only experienced it while uploading with the "teensy" protocol port selected:

image

It never occurred when I was uploading with the serial protocol port selected:

image

(despite the similar labels, these are two different things)


Unfortunately, I found the problem occurred intermittently. Intermittent bugs are usually nightmares for the developers to work on because nine times out of ten they can't reproduce it. What I often find is that what appears to be random intermittent occurrences is actually only that I am not consistently producing the specific conditions required to reliably reproduce the issue. Once I am able to identify those conditions, things can move much more quickly with the resolution of the bug.

I noticed a pattern and, since you are more knowledgeable about all things Teensy, thought you might be able to help me to understand it:

When the port loss bug occurs, I see this output from arduino-cli board list --format json --watch (I am uploading using Arduino IDE 2.x, but using Arduino CLI to monitor the behavior of the ports during the process):

{
  "type": "remove",
  "address": "usb:0/1A0000/0/1/5/1/1/3",
  "protocol": "teensy",
  "properties": {}
}
{
  "type": "add",
  "address": "usb:0/1A0000/0/1/5/1/1/3",
  "label": "hid#vid_16c0\u0026pid_0478 Bootloader",
  "protocol": "teensy",
  "protocol_label": "Teensy Ports",
  "properties": {
    "modelID": "0x25",
    "name": "Teensy 4.1",
    "serialNumber": "808372"
  },
  "boards": [
    {
      "name": "Teensy 4.1",
      "fqbn": "teensy:avr:teensy41"
    }
  ]
}
{
  "type": "remove",
  "address": "COM39",
  "protocol": "serial",
  "properties": {}
}
{
  "type": "remove",
  "address": "usb:0/1A0000/0/1/5/1/1/3",
  "protocol": "teensy",
  "properties": {}
}
{
  "type": "add",
  "address": "usb:0/1A0000/0/1/5/1/1/3",
  "label": "COM39 Serial",
  "protocol": "teensy",
  "protocol_label": "Teensy Ports",
  "properties": {
    "modelID": "0x25",
    "name": "Teensy 4.1",
    "serialNumber": "808372",
    "usbtype": "USB_SERIAL"
  },
  "boards": [
    {
      "name": "Teensy 4.1",
      "fqbn": "teensy:avr:teensy41"
    }
  ]
}
{
  "type": "add",
  "address": "COM39",
  "label": "COM39",
  "protocol": "serial",
  "protocol_label": "Serial Port (USB)",
  "properties": {
    "pid": "0x0483",
    "serialNumber": "8083720",
    "vid": "0x16C0"
  }
}

When the port loss does not occur, I see this output:

{
  "type": "remove",
  "address": "COM39",
  "protocol": "serial",
  "properties": {}
}
{
  "type": "add",
  "address": "COM39",
  "label": "COM39",
  "protocol": "serial",
  "protocol_label": "Serial Port (USB)",
  "properties": {
    "pid": "0x0483",
    "serialNumber": "8083720",
    "vid": "0x16C0"
  }
}

(I had the teensy protocol port ("COM39 Serial") selected in the Arduino IDE during both uploads.)

It makes sense that the bug would be caused by the removal and addition of the teensy protocol port, since Arduino IDE 2.x has historically struggled with handling of port changes during uploads, and perhaps also because there were recent changes to its handling of such port changes: arduino/arduino-ide#1328.

What doesn't make sense is why the removal and addition of the teensy protocol port during upload only occurs intermittently. I see that the removal and addition of the teensy protocol port also occurs when I upload using Teensyduino 1.56+Arduino IDE 1.8.19, so I don't think this behavior is abnormal for the Teensy.

Do you know why the removal and addition of the teensy protocol port during upload only occurs intermittently @KurtE?

1 Like

Thanks @ptillisch,

As I mentioned it feels like something got worse since RC9.2 so it looks like it could easily have been #1328 that is causing it.

Looks like I need to see if there is a current issue up on IDE or CLI for this?

I don't understand why it would not happen all of the time,
@PaulStoffregen (Not sure if up here) will cross post in Teensy forum.

When the program properly compiles, the Teensy Reboot code, should then reset the Teensy to run in a special mode, where then the bootloader chip will reprogram the Teensy. When this completes it will then reset the Teensy to run the new program. Note: When the teensy reboots after this, it is possible that it could have a completely different PID if the user changed the USB type of the Teensy as part of the build. And on Windows this could also cause the system to assign a new COM port, or not a com port if the USB type chosen does not include Serial. Instead, most of the other USB types will include a Serial Emulation (SEREMU) protocol which is sort of a form of RAWHID.

I have now submitted one:

Thanks for bringing this to our attention!

I will monitor that thread in case any additional information emerges there.

Thanks, looks like things have improved now with RC9.3

I'm glad it is improved for you.

Thanks so much for your valuable feedback @KurtE

Congratulations to the Arduino IDE2 team for releasing IDE 2. It has come a long ways!

I wish a few more of the Serial Monitor issues would have been resolved, especially the low hanging obvious visual warts, like, the last line(s) of text or visually truncated on the screen.

Clipboard stuff. (I assume nothing changed with this, as I have not noticed any updates)

Using the keyboard to Navigate within it. Things like using arrow keys to move up/down/left/right, especially if all of the text does not fit width wise.
The arrow keys start to work, but some of the time only so many times.
Like just now, I had an output of a couple hundred lines. I went to the top, where some longer lines are, hit right arrow worked to scroll. Scrolled back to first columns, started hitting down arrow. It worked for sometimes like 5 presses of down arrow other times maybe 8, or 9, and then stopped responding.

(today's release)

Hi @KurtE. There haven't been a significant number of changes between 2.0.0-rc9.3 and 2.0.0:

Essentially the only changes are the fixes for two bugs.

One of them doesn't have anything to do with Serial Monitor:

The other one does, but isn't one of the problems discussed here:

The reason there haven't been a lot of changes is because we have been intentionally staging most of the development work so that we could deliver what has been well validated by the beta testers of the release candidates in the 2.0.0 release. Now that is out, we can start merging in the work that will be part of the next release..

You can get a preview of some of that here:

https://github.com/arduino/arduino-ide/pulls

Good news! The fix for this was just merged, so it will be in tomorrow's nightly build and also in the next production release:

2.0.0: stable, but unfinished.
My #1 aggravating bug, the serial monitor window last line is partially obscured, is still partially obscured.
For people that are just printing stuff like "Hello, World!" the present functionality is acceptable.
But if you are decoding things in real time and printing to the Serial port, you can't read what is on the last line.
It's not so bad when you are using Serial.println() because you can scroll quickly.
But if you are using Serial.print() (character-by-character), the window moves back the (approximately) half-line downward on EACH character printed.
Nonetheless, I am using 2.0 solely here now. Overall, it is a big improvement.

  • Wes.
1 Like

Hi @weshowe

This bug is being tracked by the Arduino IDE developers here:

1 Like

@weshowe @ptillisch

It is for sure very high in my list as well. Hard to say if it is my top one, it is is not, it is darn close!

It is more or less a tie, in simple usage pattern, I often do. Example I am now trying to debug Bluetooth support in teensy usbhost support and looknig at a little Rii keyboard that has touchpad, and why we are not processing the touchpad input...

I press button on that keypad and the debug information printed:

  1. There is that issue, cannot read the debug information on last line.

Next maybe I hit one of the mouse buttons to see what the difference is in the data. It starts with an 8... But I want to get back to see how many messages were generated, so I want to scroll back to where the HID_data messages went from 01 to 08.

  1. So I click in the Serial monitor window and then use the up arrow to scroll back in the data. This time the arrow worked twice before all keyboard input was ignored. Sometimes a few more.

  2. So I decide to copy the text from Serial Monitor to an editor, so I scroll through it. And be able to search for things. So I click again in Serial Monitor Window. and type ctrl-a - and instead of all of the text in this window selected, all of the stuff in Source code window is selected. Try right click mouse in this window hoping for context menu, none... So how do I select all? I end up manually scroll to to the top, and left click and then scroll through all of it selecting it.

How to do copy now.? ctrl-c appears to work - I had no confidence as ctrl-a did not work in this window, but no context menu, no button... So hopefully I have the several hundred lines selected.

  1. Go to my editor, create new window, and do a paste. And I end up with only 16 lines of data

Which of these 4 parts is the most aggravating to me? Is hard to say.

But until this what I would consider a pretty standard usage pattern is resolved, I will continue to use TyCommander for most all of the Serial output. It unfortunately gets in the way of reprogramming the Teensy, so I often have to press the program button on teenys or quickly turn off it's serial monitoring or hit the program button on the Teensy.

I am too mainly using this for Arduino sketch stuff.

Although probably the majority of the time I will continue to use sublime text to do most of the editing and maybe building, as the IDE does not allow me to work on the libraries or core files.

Based on their past performance, I have no doubt that when the proper round tuit is presented, the Serial issues will eventually be fixed. The competence of the programmers has proven to be sufficient, given the enormity of the task at hand.

But, given the long time since notice was presented, I can't help but question the judgement of the person(s) that decided to move from beta to release status with known deficiencies.

  • Wes
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.