Python Forum

Full Version: set -x shell equivalent of python, possible/available?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For fast debugging line by line, I use "set -x" in shell scripts. It shows line by line execution and its result in output console.
Seems no such thing in python, or am I wrong? If so, what are equivalents in python that I can see line by line execution?

I explore followings:
1) python --verbose: waaaaaaay to versbose, I just need line by line execution only no deep verbose info.
2) python3 -m pdb: it is like a debugging, walk through line-by-line, convenient but too slow.
Thx!
Try the trace module perhaps.