On Sun, Nov 15, 2009 at 9:08 PM, James Youngquist
<james.youngqu...@gmail.com> wrote:
>
> Hello,
>
>  I'm new at the whole python/sage thing.  Is there a better way to debug
> pieces of code we're working on other than to insert print statements?
> Something where we can step through the code a line at a time or generate
> profiling information regarding number of times a function was called?
>

1. On the command line type "%pdb" to turn on the automatic debugger.

2. Read http://docs.python.org/library/pdb.html

3. For Cython code, use gdb:

    sage -gdb

4. I plan to implement a debugger like pdb in the notebook.  Something
very similar has already been done by the Pylons project, which should
give an idea of how to do it for Sage.

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to