Breakpoint problems

Hi guys.

I’m experiencing a problem with breakpoints (using JMonkeyEngine).

As the manual states, when a breakpoint is hit, I return to the IDE code window. Problem is that, while the keyboard input is released when focus switches from my game to the IDE, the mouse control isn’t.

As a workaround, I call AppSettings.setUseInput(false) to turn off all input, but it’s a bit frustrating not being able to use the debugger to debug errors in methods triggered by movement.

Anyone have any hints on how to solve this?

Product Version: jMonkeyPlatform Alpha-3

Java: 1.6.0_20; OpenJDK Server VM 19.0-b09

System: Linux version 2.6.32-27-generic running on i386; UTF-8; en_US (jmonkeyplatform)

Hm, I never use breakpoints so I never noticed this, I guess its about how lwjgl handles the input… No idea for a more simple workaround atm…

If you’re using FlyByCamera, you can enable the drag to rotate option (setDragToRotate) this will only hide the cursor when you’re holding the mouse button

Thanks for input.

I ended up using a different solution for this. It’s not optimal, but solves my problems. I turn this on only when i expect a breakpoint to be hit.

Thought I could share it, if anyone else is also looking for a solution for this.

In the default inputManager provided by JMonkeyEngine, turn on “inputManager.setCursorVisible(true)”.

This will make the cursor visible in the application, and it will also free the cursor when you exit the application window.

When a breakpoint is hit, the application windows will loose focus and the mouse control is released.

Some control of camera movement will be lost (since movement stops when you exit the application boundary), so I solve this by using the “left, right, up down” keys to turn mouse back into the center.

Not optimal solution, but it helps me out and hopefully someone else will find this useful.

1 Like