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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…