| 1 | initial version |
Here's one way to use Emacs' Grand Unified Debugger (GUD) with the Sage library:
sage is in the PATH.cd SAGE_ROOTcp local/lib/python/pdb.py .pdb.py to #!/usr/bin/env sageemacs and type M-x pdb + <ENTER>Run pdb (like this): ./pdb.py foo.py to debug foo.py.Caveats:
foo.py should contain a statement like from sage.all import *, in order to use Sage library code.foo.py should not require the Sage preparser. You'll need to use R = PolynomialRing(QQ, 'a,b,c'), for example, instead of R.<a,b,c> = QQ[].I hope there's a better way! But with this approach, stepping into R = PolynomialRing(QQ, 'a,b,c') will make Emacs jump to the appropriate line of polynomial_ring_constructor.py.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.