So I\'m debugging my python program and have encountered a bug that makes the program hang, as if in an infinite loop. Now, I had a problem with an infinite loop before, but
Let's assume that you are running your program as:
python YOURSCRIPT.py
Try running your program as:
python -m trace --trace YOURSCRIPT.py
And have some patience while lots of stuff is printed on the screen. If you have an infinite loop, it will go on for-ever (halting problem). If it gets stuck somewhere, then mostly you are stuck on I/O or it is a deadlock.