I'm taking the assumption that when you want to backwards engineer the protocol of a serial port device.
As posted above, it can be tricky if the line is already open, but can be done with a couple of extra serial ports.
In order to do this you need to 2 extra serial ports installed on your machine (or a seperate PC) and a small cable to link two of the ports together.
So you have this set up
COM 1 - connected to COM 2 via a small cable (rx to tx, etc).
COM 3 - connected to the serial port device.
The software that drives the serial port device would be configured to COM 1.
A cable physically routes all traffic from COM 1 to COM 2, your software would then route all serial traffic between COM 2 and COM 3 and logging the data inbetween.
This is a useful technique if you want to backwards engineer a serial protocol for a device.