0

There is a part in my program which does not work as intended. My idea is to see what happens using the debugger of Pycharm Community Edition. However, the program freezes/crashes during the debugging which obviously makes debugging difficult as the program is a breakout clone.

The game is playable if I just run the program without debugger.

I am not posting any code right now as I think that I have a general issue here.

funie200
  • 3,688
  • 5
  • 21
  • 34
rozer
  • 1
  • 1

1 Answers1

0

The debugger and your tk instance is running on the same thread, thus when you enter the debugger it blocks the gui.

You will find after exiting debugger, the UI thread is released.

A solution would be to run your debugger on a separate thread. See this (or other similar posts) how to do that: Tkinter: How to use threads to preventing main event loop from "freezing"

Sazzy
  • 1,924
  • 3
  • 19
  • 27
  • Thanks. I will read the old threads following your suggestion. Do I understand you correctly that there is another solution? – rozer Dec 05 '20 at 21:43
  • Likely, there is a small number of solutions. If you shared a simplified version of your code, it would be easier to suggest how to implement the fix. – Sazzy Dec 05 '20 at 21:47