You should find if it is the usb or the processor that is malfunctioning. Try this:
void setup() {
Serial.begin(9600);
pinMode(13,OUTPUT);
}
void loop() {
Serial.println("hallo");
digitalWrite(13,HIGH);
delay(1000);
Serial.println("bye");
digitalWrite(13,LOW);
delay(1000);
}
Disconnect, then reconnect the Arduino. If the onboard pin 13 LED is on for a second and off for a second over and over, the code is still running. If not, the code has failed.