<div dir="ltr">Colin-<div>Probably pdb.  You can use pdb.set_trace() to start the debugger - it sounds like you want to put this at the beginning of the function you&#39;re debugging.  Please check <a href="https://docs.python.org/2/library/pdb.html">the documentation for pdb</a>, which includes some examples.  The <a href="http://pythonconquerstheuniverse.wordpress.com/2009/09/10/debugging-in-python/">&quot;debugging in python&quot;</a> article at pythonconquerstheuniverse is also nice.<br>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 19, 2014 at 12:00 PM,  <span dir="ltr">&lt;<a href="mailto:testing-in-python-request@lists.idyll.org" target="_blank">testing-in-python-request@lists.idyll.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Send testing-in-python mailing list submissions to<br>
        <a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:testing-in-python-request@lists.idyll.org">testing-in-python-request@lists.idyll.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:testing-in-python-owner@lists.idyll.org">testing-in-python-owner@lists.idyll.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of testing-in-python digest...&quot;<br>
<br>Today&#39;s Topics:<br>
<br>
   1. pdb, coverage.py, etc... what&#39;s the right tool?<br>
      (Colin Kincaid Williams)<br>
<br><br>---------- Forwarded message ----------<br>From: Colin Kincaid Williams &lt;<a href="mailto:discord@uw.edu">discord@uw.edu</a>&gt;<br>To: <a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>

Cc: <br>Date: Thu, 19 Jun 2014 00:51:12 -0700<br>Subject: [TIP] pdb, coverage.py, etc... what&#39;s the right tool?<br>Hi,<br>
<br>
I want to step through a python script with a main method and print<br>
out everything similar to what is displayed in an interactive python<br>
session. Print and use output redirection, or just write it to a file.<br>
I read on Stack Overflow that I would want to use coverage, but I<br>
didn&#39;t see this use case explicitly in it&#39;s docs. Right now I&#39;m<br>
copying and pasting everything and it&#39;s really tedious. Is there an<br>
easy to use tool built for this?<br>
<br>
Regards,<br>
<br>
Colin Williams<br>
<br>
<br>
<br>_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
<br></blockquote></div><br></div></div></div>