Serial Monitor swallows my print lines

This is what Serial Monitor should print out:

17:11:44.257 -> [D][WiFiGeneric.cpp:419] _eventCallback(): STA IP:, MASK:, GW:
17:11:44.262 ->    Check[ms:Status]: 0:6 100:6 200:6 300:6 400:6 500:6 600:6 700:6 800:6 900:6 1000:6 1100:6 1200:6 1300:6 1400:6 1500:6 1600:6 1700:6 1800:6 1900:6 2000:6 2100:0 2200:3 CONNECTION
17:11:44.361 -> -------------------- WiFi Initialization ended after 1 connection round(s) with 'SUCCESS'
17:11:44.372 -> connected: SSID:'fb7490', RSSI:-41, Hostname:'esp32-arduino', IP:, BSSID:CC:CE:1E:7A:91:EA, dur:2350ms

This is what it most of the time only prints out:

17:7:31.499 -> [D][WiFiGeneric.cpp:419] _eventCallback(): STA IP:, MASK:, GW:
17:7:31.505 -> 0-------------------- WiFi Initialization ended after 1 connection round(s) with 'SUCCESS'
17:7:31.516 -> connected: SSID:'fb7490', RSSI:-42, Hostname:'esp32-arduino', IP:, BSSID:CC:CE:1E:7A:91:EA, dur:2249ms

17:9:52.933 -> [D][WiFiGeneric.cpp:419] _eventCallback(): STA IP:, MASK:, GW:
17:9:52.939 -> 6-------------------- WiFi Initialization ended after 1 connection round(s) with 'SUCCESS'
17:9:52.950 -> connected: SSID:'fb7490', RSSI:-37, Hostname:'esp32-arduino', IP:, BSSID:CC:CE:1E:7A:91:EA, dur:2249ms

Note that the line Check[ms:Status]... is missing, or as here, reduced to a '0' or '6' and nothing else.

You don't say which hardware you are using. Are you using a hardware UART or a software serial port? And, are you sure that the missing text is being sent in the first place?

Oh, sorry. ESP32 connected via USB2Serial. The port /dev/ttyUSB0, which is also used for uploading, is used for printing. Just the overall default for Serial.print.

The missing text is sent. If anything is sent at all, then at least Check[ms:Status] must also have been sent, and that is always missing, unless the full text is sent.

Might be a problem printing from both cores to Serial?

How can we talk about sketch output if there is no sketch code?

I have now run the very same code on Ar2.0beta7, and on Ar1.8.13.

On 2.0 Serial Monitor does swallow lines as shown above. On 1.8.13 not a single line got lost watching over several hundred of those printout candidates.

Is there any way I can track was goes into the monitor and what not?

If the port baud in the Monitor and Arduino is the same, then the Monitor prints everything that Arduino sends.
If the monitor does not print, then Arduino is not sending.
Do you need the sketch to work or do you need Arduino 2.0 beta?

Make a wild guess: why do you think I am using BETA software?

The missing line problem seems to be even weirder than thought. As said, it happens ONLY on Ar2.0beta7, and not on Ar1.8.13. Both using ESP Core 1.0.6.

Also, it ONLY happens when I have activated Tools --> Core Debug Level with a level sufficient that Debug messages are printed.

Debug level logs are the only ones the WiFiGeneric lib gives out. See initial post for example. I can't tell if this problem exists also for other levels.

But under these conditions missing lines happen in about 80%(!) of all cases.

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

The formal issue report for this is here:

But I notice an odd discrepancy. In this forum thread we have the statement:

it happens ONLY on Ar2.0beta7, and not on Ar1.8.13

But on GitHub:

Running the exact same code on Arduino 1.8.13 reveals that the bug is already present in this older version:

The latter indicated to me that the cause was in the ESP32 core library or toolchain code, even though the Serial Monitor output was where the symptom was visible, it was not actually related to the Arduino IDE Serial Monitor code.