Problems with debug

I’ve made a program that send on interrupt ASCII charatters. I use windows 7 with AVRstudio and my program is in c:

#define F_CPU 16000000UL			 // Setto il clock
#define BAUDRATE 9600				// Baud rate
#define BAUD_PRESCALLER (((F_CPU / (BAUDRATE * 16UL))) - 1)    //Calcolo l'UBR
#include <avr/io.h>                
#include <avr/interrupt.h>
#include <util/atomic.h>
#include <util/delay.h>

char codice=0x20;
int main(void)
{
	 ATOMIC_BLOCK(ATOMIC_FORCEON)
	 {
		 init();        //Inizializzazione
	 }
	 UCSR0A = (1<<UDRE0);
	 do 
	 {
		 UCSR0B |= (1<<UDRIE0);
         codice++;
     }while(codice<=0x7E);
}
void init(void)
{
	UBRR0H = (unsigned char)(BAUD_PRESCALLER>>8);  // Setto il baud rate
	UBRR0L = (unsigned char)(BAUD_PRESCALLER);     // Setto il baud rate
	UCSR0B = (1<<TXEN0);						   // Abilito la trasmissione
	UCSR0C = (1<<USBS0)|(1<<UCSZ01);               // Setto il formato del frame in questo caso: 7 data, 2 stop bits
}
ISR(USART_UDRE_vect)         //questo è quello che succede quando viene riempito il buffer in invio
{
    UDR0 = codice;           //carico il dato da inviare
    UCSR0B &= ~(1<<UDRIE0);  //disabilito l'UDRE interrupt
	_delay_ms(1000);
}

The problem is that: the program entry on ISR only if you see the code on the disassembly tab when you do the debug. Why in normal mode (if I see the debbugger in main programm) the program doesn’t entry in ISR?

I've made a program that send on interrupt ASCII charatters. I use windows 7 with AVRstudio and my program is in c:

Many of the folks on the forum will have knowledge of AVRstudio, but the real impetus of the Arduino in the forum name suggests that the GUI will be Arduino and the target will be an Arduino product (or naked/clone version of same.)

Just my suggestion, you may get better fishing on avrfreaks.

Ray