I have a game written in Pygame and was trying to debug it. I am new to debuggers so I am not even sure which one to use but I downloaded Pycharm. Anyway, my game starts up and shows the game screen along with a "Play" button in the middle of the screen. When you click on the Play button, the Play button is supposed to disappear and three other buttons are supposed to appear so that you can choose your skill level: Easy, Medium and Hard. When you choose your skill level, the game is supposed to begin.
The game is beginning when I click the Play button. The other three buttons are not showing. I want to use a debugger to see what is happening in the code when the Play button is clicked.
The problem that I am having is that when I try and debug the code, the game starts and takes up the full screen. I cannot see the debugger. When I click the Play button, I get the same bug as already mentioned earlier but I am unable to see the debugger to know what is happening in the code.
I need some advice. Which of the following paths should I head down?:
Path A: Try and figure out how to get the game to open in a window different from and next to the debugger window.
Path B: Try and figure out how to simulate clicking on the Play button, in the debugger, without actually running the game.
Path C: Follow a different path that I have not even thought of but someone on Stack Overflow is about to explain to me. :)
PS: I am not asking for help with the code. I can probably figure out the problem without a debugger. I am asking for help with how to use a debugger so that I can debug in the future and not have to ask so many questions.
clipovich
I think path A would be the best. On windows and some linux distros, you can try pressing flag+left or right arrow. Then click the debugger and press flag+left or right arrow (opposite of pygame window side). This will allow you to see both windows at once
How do I debug a video game that requires me to play the game in order to re-create the bug?