I have this example code to show:
import pygame
pygame.init()
win = pygame.display.set_mode((500, 500))
r = True
while r:
for event in pygame.event.get():
if event.type == pygame.QUIT:
r = False
if pygame.key.get_pressed()[pygame.K_u]:
pass # BREAKPOINT HERE
win.fill((255, 255, 255))
pygame.display.update()
And when you press the u
key, it hits the breakpoint and functions normally, right? But consider this:
import pygame
pygame.init()
win = pygame.display.set_mode((500, 500))
r = True
while r:
for event in pygame.event.get():
if event.type == pygame.QUIT:
r = False
if pygame.mouse.get_pressed()[0]: # The only line that changed
pass # BREAKPOINT HERE
win.fill((255, 255, 255))
pygame.display.update()
When you left click it breakpoints normally, but then you cannot click anywhere on the vscode window! You can still type on the file, but you cannot click! And then when you press the keyboard shortcut for ‘stop running current file’ (for me, f5) then it stops normally and you can now click! You can even when it is not responding make a new vscode window and it will launch properly but also be unable to be clicked from! Why could this be so? Can anyone help fix this?
Any help appreciated!
VSCode version info:
Version: 1.89.0
Commit: b58957e67ee1e712cebf466b995adf4c5307b2bd
Date: 2024-05-01T02:08:25.066Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 6.5.0-28-generic snap