#Mouse clicks stop working while debugging a game

3 messages · Page 1 of 1 (latest)

merry crescent
#

I am developing a mod for the game Factorio. The game runs fine. The mod works fine. I am using an IDE extension* to provide debugging functionality in the game. I launch the game in debug mode with a breakpoint defined in my code, do stuff in the game, hit the breakpoint. Now I'm looking at my IDE with all the appropriate debugging info visible. At this point, I can perform all normal interactions with my computer from the keyboard, I can move my mouse, and hover tooltips appear when I put my mouse cursor on elements in various programs. However, left/right/middle clicks have no effect anywhere. Not in the game, not in the IDE, not in Discord or any other open program.

Although hovering things gets me tooltips, xev doesn't report mouse MotionNotify events while this problem is happening (in addition to not reporting click events, as expected).

How can I find out what's causing this? Is there a way I can ask X to tell me what is intercepting mouse events?

* https://marketplace.visualstudio.com/items?itemName=justarandomgeek.factoriomod-debug

merry crescent
#

Using gdb to catch SIGINT on the game process does not cause the same misbehavior. The game freezes while the debugger waits for input, as expected, but my mouse still works everywhere else.

merry crescent
#

This problem only happens when the breakpoint is triggered inside a mouse click handler (after I click, before I release)