Python Forum
Step through process - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Step through process (/thread-14654.html)



Step through process - tjnichols - Dec-10-2018

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!


RE: Step through process - Larz60+ - Dec-10-2018

if you install VSCode IDE see: https://python-forum.io/Thread-VS-Code-from-start?highlight=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.


RE: Step through process - micseydel - Dec-12-2018

You might find http://pythontutor.com/visualize.html#mode=edit useful.


RE: Step through process - buran - Dec-12-2018

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


RE: Step through process - jeanMichelBain - Dec-12-2018

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.