user34258: I am using the hardware serial ports of Atmega 328 to connect to a GPS module . A GSM SIM900 module is connected via Software serial . Is it possible to print the debug statements in the Serial window while the GPS module is connected to the hardware serial ports? Both my module and the Serial window is set to 9600 bps baud rate .
Also I want to read the GSM responses from the Software serial and print the same in the Serial window for debugging. Is this possible? 

user14737: 
Is it possible to print the debug statements in the Serial window while the GPS module is connected to the hardware serial ports?

Yes, that works.  If you connect the Arduino TX pin 1 to the GPS RX, then everything you print to Serial goes to both the Serial Monitor window and the GPS device.
This works, because:

It's ok if you see the GPS configuration commands (if any) on the Serial Monitor window.  Your debug prints will appear after them.
The GPS device ignores anything that doesn't start with a '$' character; it ignores all your debug prints.


34258: <p>I am using the hardware serial ports of Atmega 328 to connect to a GPS module . A GSM SIM900 module is connected via Software serial . Is it possible to print the debug statements in the Serial window while the GPS module is connected to the hardware serial ports? Both my module and the Serial window is set to 9600 bps baud rate .
Also I want to read the GSM responses from the Software serial and print the same in the Serial window for debugging. Is this possible? </p>
 14737: <blockquote>
  <p>Is it possible to print the debug statements in the Serial window while the GPS module is connected to the hardware serial ports?</p>
</blockquote>

<p>Yes, that works.  If you connect the Arduino TX pin 1 to the GPS RX, then everything you print to Serial goes to <em>both</em> the Serial Monitor window and the GPS device.</p>

<p>This works, because:</p>

<ul>
<li>It's ok if you see the GPS configuration commands (if any) on the Serial Monitor window.  Your debug prints will appear after them.</li>
<li>The GPS device ignores anything that doesn't start with a '$' character; it ignores all your debug prints.</li>
</ul>
