Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python pdb: step into a function called from console [duplicate]

Note: To explain this quickly I'm going to talk about this from the perspective of working in Spyder.

If the a function is called in my code, I can put a break point next to where it's called and then when my code gets to that point I can click the "Step into function.." button to see what happens inside this function.

Suppose I'm at some arbitrary breakpoint and want to see what happens inside a function that's not in my code. Is there any way to call this function through the pdb console and "step into" said function call?

like image 509
mathandy Avatar asked Oct 20 '22 16:10

mathandy


1 Answers

You can use ipdb. put ipdb.set_trace() wherever you want to debug. Then press s to step into the function.

like image 186
Mudits Avatar answered Oct 22 '22 09:10

Mudits