[yt-users] How to turn on Debugging?

Matthew Turk matthewturk at gmail.com
Mon Dec 13 15:26:47 PST 2010


Hi Chris,

On Mon, Dec 13, 2010 at 3:24 PM, Chris Malone <chris.m.malone at gmail.com> wrote:
> Hi,
>
> It's not very well documented - or at least I wasn't having luck finding
> mention in the docs - how to properly turn on debugging for yt.  After some
> time digging through the source, I have found that this is handled through
> the *logging* module - a standard module, which I am not (but should be)
> familiar with.
>
> Anyhow, I have gathered that I can turn on debugging by adding the following
> two lines to my ~/.yt/config file:
>
> [yt]
> LogFile = True
> LogLevel = 0
>
> Is this the recommended usage?  Is there an easier way to turn debugging on
> for, say, a single iyt or yt invocation via a command line argument?

It depends on what you want to do.  What you've put in there -- which
I agree should be better documented -- will turn on debugging
statements that have been sprinkled throughout the source by the
developers.  This won't necessarily help out if you have a traceback
or other error, in which case some of the techniques in "Debugging and
Driving" might help:

http://yt.enzotools.org/doc/advanced/debugdrive.html

You might also try just running with the "pdb" module:

python2.6 -m pdb your_script.sh

This will put you into a postmortem phase where you can inspect the
code if an exception occurs.

-Matt

>
> Chris
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>



More information about the yt-users mailing list