Arduino Mega 2560 hangs up when uploading program?

well i ran into this problem and there are many threads around the forums but the real solution is to erase any comment or set of characters in strings that have “!!” if you erase that it will work…

thats what happened to me and after expending hours reading i just delete " !!!" that i had on a string that was printing on the serial port… and it worked…

but the real solution is to erase any comment

Comments are not compiled, and so are not part of this problem.

well delete anythign looking like this

Serial.println(" it Works !!!!!");

and replace by

Serial.println(" it Works ");

well delete anythign looking like this

Better still, don't put it in in the first place.