-3

I have a high level logic error deep within my Python script, and pdb doesn't help to debug it. Is there any other way to see what is being executed after I run my script?

NOTE: pdb is too slow and inconvenient for me. I wish I could grep over all cases when my function is executed, instead of inspecting manually each and every call, set/unset breakpoints. The state is lost when I exit pdb and its user interface is more confusing than helpful - requires docs at hand.

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
anatoly techtonik
  • 19,847
  • 9
  • 124
  • 140

1 Answers1

1

I found a way to do this using excellent trace module that comes with Python.

An example how to troubleshoot module installation problem:

python -m trace -t setup.py install > execution.log

This will dump all source line of setup.py install execution to execution.log. I found this to be more useful than pdb approach.

anatoly techtonik
  • 19,847
  • 9
  • 124
  • 140