Python Forum

Full Version: Step through process
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anyone know of software that would allow me to see what is going on with my code line by line so I can see where it hangs up? What's actually working?

Thanks in advance!
if you install VSCode IDE see: https://python-forum.io/Thread-VS-Code-f...ght=VSCode
you can use the built in debugger to run step by step, it also allows you to modify variables and execute statements on the fly,
watch specified variables change state, and more.
Just to add that all advanced IDEs (not just VSCode) have debugger that offer step-by-step execution, breaking points, monitor variable values, etc.

for VS Code: Debugging configuration and also Debugging general info
for PyCharm
You can have a look on module pdb :
https://docs.python.org/3/library/pdb.html
It comes with python and it is extensible, so you can add your own debugging code and create automation if you wish.
Also, Idle comes with python, and is slightly different.
Pudb is also console based, very easy to use, and very efficient. I use it on production or slow computers with no GUI. It's in debian repository. See :
https://pypi.org/project/pudb/
Furthermore, winpdb is with a GUI, works on linux (and windows, but I never tried on it), with an interesting feature : it can be attached by a socket, so you can debug background or distant processes. Useful with web applications and also in debian repository.
On windows, you could try pywin32, efficient for GUI applications.