<?xml version="1.0" encoding="windows-1252"?>
<node id="348503" title="Re: Unbelievably Obvious Debugging Tip" created="2004-04-27 10:29:51" updated="2005-08-06 03:16:34">
<type id="11">
note</type>
<author id="169744">
Abigail-II</author>
<data>
<field name="doctext">
Before everyone starts modifying their programs, modifying all their print statements, I'd like to point old and trusty &lt;tt&gt;cat&lt;/tt&gt;. Everyone knows &lt;tt&gt;cat&lt;/tt&gt;. Not everyone knows its options. &lt;tt&gt;-E&lt;/tt&gt; is very useful in this regard: it makes &lt;tt&gt;cat&lt;/tt&gt; print a $ at the end of each line. Other useful &lt;tt&gt;cat&lt;/tt&gt; options for debugging output: &lt;tt&gt;-T&lt;/tt&gt; which displays tabs as &lt;tt&gt;^I&lt;/tt&gt;, and &lt;tt&gt;-v&lt;/tt&gt; which will show non-printable and non-ASCII characters using &lt;tt&gt;^&lt;/tt&gt; and &lt;tt&gt;M-&lt;/tt&gt; notation. With some versions of &lt;tt&gt;cat&lt;/tt&gt;, 
&lt;tt&gt;cat -vET&lt;/tt&gt; can also be written as &lt;tt&gt;cat -A&lt;/tt&gt;.
&lt;p&gt;
&lt;tt&gt;cat&lt;/tt&gt; is your friend. Never debug without it!
&lt;p&gt;
Abigail</field>
<field name="root_node">
348480</field>
<field name="parent_node">
348480</field>
</data>
</node>
