i tried to test the sleep mode on Leonardo. But after upload the sketch, the Led is always on. And i can't upload other sketch anymore,the devices is always unknown. I have tried other board, i still can distinguish the device for Leonardo and upload the sketch.

Is the problem in the code? it should be wake up each 2 sec,does it the reason for this problem?

Answer: The watchDog time is shortly, the program stuck in the loop. I used Arduino Nano as ISP, then burn the bootloader to my Leonardo. Everything is fine now.