Debugging cython code with pdb. Problems stepping into code

510 views
Skip to first unread message

Ian

unread,
Aug 31, 2009, 2:19:02 PM8/31/09
to APAM Python Users
I believe that the python debugger, pdb, cannot step into cython code
(code defined in a *.pyx file). Anyone know the answer?

I also created the files:
############ script.py ################
import cy_funs
print cy_funs.myfun(4)

######### cy_funs.pyx #########
def myfun(object r):
return r
######################

I found that pdb was unable to step into the call cy_funs.myfun(4).
Also, consider this post:
http://www.mail-archive.com/cytho...@codespeak.net/msg06330.html
search for the term pdb and you'll see a (recent) discussion that
seems to indicate cython-level code debugging is impossible.


Ethan Coon

unread,
Aug 31, 2009, 2:29:47 PM8/31/09
to apam-pyt...@googlegroups.com
Hmm, that stinks. You've probably seen this:

http://wiki.cython.org/DebuggingTechniques

which describes how to use gdb, but that's certainly not as convenient
as pdb. But would likely work...

Ethan

--
-------------------------------------------
Ethan Coon
DOE CSGF - Graduate Student
Dept. Applied Physics & Applied Mathematics
Columbia University
212-854-0415

http://www.ldeo.columbia.edu/~ecoon/
-------------------------------------------

Reply all
Reply to author
Forward
0 new messages