The printer driver broadcasts messages at every StartDoc, StartPage, EndPage, EndDoc event to every application running on the system. The reason the printing is stopped is, because the printer driver sent a message to the debugged application. The printer driver at this point is waiting for your application to process or release the message, but your application is suspended by the debugger. The debugger stopped the message loop of the debugged application and the message cannot be released or processed by your application.
Due to how the messages are sent, this is normal behavior. The way the printer driver sends the messages cannot be changed. The messages must be sent in such a way so that the processing application can capture (receive) the message the exact moment the event occurs.
However, the messaging interface can be turned off in the printer driver. If the messaging interface is turned off, the printer driver will not broadcast the messages at the StartDoc, StartPage, EndPage, EndDoc events. The application can be debugged without stopping the printing.
To turn off the messaging feature in the printer driver, go to the "Printer Preferences" , "Start Application" tab, and check the "Disable the Messaging Interface" checkbox.
The message sending feature can be turned on any time by un-checking the "Disable the Messaging Interface" checkbox.