...or you could try a different approach. Use Serial for the serial device. You have to disconnect pin 0 to upload new sketches over USB. Or get an ISP and leave it connected.
You didn't identify the serial device, so I can't tell whether you could still do debug prints. Some devices ignore data that isn't in its required format (e.g., GPS devices).
Even if you can't do debug prints to Serial, you might be able to use AltSoftSerial for debug prints. Connect pins 8 & 9 to a TTL Serial-to-USB adapter (aka FTDI). AltSoftSerial is the best software serial library, but it disables PWM on pin 10 (on an UNO).
Need more information, including the code. Loop structure is very important.