Leonardo doesn't give any output on the serial monitor

I'm having problem with my ardiuno leonardo ... i tried to get an output on the serial monitor but no luck ... the monitor is blank ... i tried the same code on an UNO but it works just fine ! the code is Very simple so i don't think there's any need to tweak the code ... Please help me out ...

Did you add the special Leonardo code in setup()?

void setup() { 
 //Initialize serial and wait for port to open:
  Serial.begin(9600); 
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

vinaykumar1908: the code is Very simple so i don't think there's any need to tweak the code ...

What code?

How to use this forum