upload hangs with code with certain Serial.print statement

:astonished:I have a sketch that worked perfect until I added a line in the code that read

Serial.print("    Cliff!!!!!    ");

With that line in the code included in the3 sketch the IDE hangs everytime when uploading. I am uploading to a mega 2560 r3 and have no trouble with any other uploads. I took the entire print statement out of the code and it worked fine. I put it back in and changed it to

Serial.print("Cliff!");

and it works fine. There is something about the multiple spaces or multiple exclamation points that causes a problem. Anyone have any thoughts on this? It isn't critical, I changed the text in the print statment and it is fine. I would like to know what is causing this so I don't do it again in the future.

Thanks,

Jim, K6JMG

The !!! throws the Mega bootloader into its debugging mode, unfortunately.

will cause the same issue.

No, it won't. That code will generator a compiler error, which is completely different from uploading, which happens far later in the build process, doing unexpected, but known, things.

Thanks, Folks. Bug, feature, don't really care. It sounds like it is a known event so I just need to remember to not do it again. I didn't need the exclamation points, I was just doing it for emphasis.

I also apologize for posting this if there was another thread about the issue. I did some searching around but, obviously, didn't search on the right thing.

Thanks,

Jim