I am not appending to this thread with the intent to solve the original post #1 inquiry.
What was attempted to be solved then was a result of chasing the symptom, and not the actaul cause as I shall explain.
It became evident that the way in which the Trace output behaved was a direct result of the corruption caused by the underlying task that has just recently resurfaced again.
re: 'It's not 10 lines of code. It's at least 700 lines of very dense JS.'
It is amazing that 18 months have elapsed and no others have stumbled across what I spent many weekends of countless hours testing and documenting then, that is until now.
@skm recent post again reported this discovery
The endless anomaly above occurs after my source gets clobbered just using the Wifi or tinyMQTT module functions in a similar manner to how @skm did in the above thread link.
It appears that user defined single character function names and var declarations are affected. In the following link, several single char objects up to letter 'f' get clobbered, so my hunch is that it is for all letters of the alphabet that minification may produce it's own instance. From using Google's closure compiler, I've had the full range of the alphabet in resultant output, so this is quite possible.
Back on Sun 2020.04.26, I had provided unique example code snippets using the Wifi module demonstrating this:
Which included an example using a Wifi method in post #4 with steps to reproduce.
You'll note that I pared down the snippet to a basic example that coincidentally has the same single char function that gets clobbered when those moudles are loaded as did @skm in his example.
I even filed a issue #1811 with an exact descriptive title on Sun 2020.05.03 which was dismissed
Anomaly in deployed module corrupts user namespace global scope
Interesting how one may be blinded by simplicity and incorrect conclusions drawn while observing the symptom and not the cause.
It appears what I discovered then is now understood.
Yes. When you're calling a debug command that's designed for looking at small sections of code in detail, and you then apply it to an entire WiFi and MQTT driver on a small embedded device, that's what happens.
It's not 10 lines of code. It's at least 700 lines of very dense JS.
No. I actually did this before in order to test what was going on. I'm not doing it again just so I can record it for you.
I've already wasted a vast amount of time trying to help you, and trying out your suggestions to reproduce and figure out what's going on.
But as I suspected there's no problem. This is very obviously NOT and "infinite while
condition" as you mentioned, and you obviously neglected to mention the fact that your infinite loop did in fact end, it just took a while.
At this point it seems obvious you haven't taken on board anything I've been saying in the past few posts, and you're just wasting my time even more.
If anyone else wants to jump in here you're welcome, but I'm done with this.