Actually, what I use from time to time is

https://wiki.python.org/moin/DebuggingWithGdb

It works reasonably well (but a bit painful since the
C stack of a Python program is huge).

Le 27/03/2020 à 21:24, Vincent Delecroix a écrit :
Hello,

https://cython.readthedocs.io/en/latest/src/userguide/debugging.html

Le 27/03/2020 à 18:47, Volker Weißmann a écrit :
Hello,

let's say you are trying to figure out how sage's diff-function work. Maybe
you write something like
#!/usr/bin/env sage
from sage.all import *
u = var('u')
breakpoint()
diff(sin(u), u)

and run it with ./filename.py . Once the breakpoint is encountered, you can
use step to step into the diff function and place breakpoints with break
filename:linenumber in sage's python code. I'm using this a lot and it
works fine. Problems arise, once you try to debug cython code. Neither
stepping nor placing breakpoints in the *.pyx file works.
I also tried https://trac.sagemath.org/ticket/13881, but this also works
rather poorly.

How do you guys usually debug sage's cython code?


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/5309b7ee-6830-20bb-640b-433632273754%40gmail.com.

Reply via email to