Debugging issue concerning setCursorVisible()

Not at my linux machine so I cant test this, will do tomorrow but I found the source (main: debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/CodeEvaluator.java@88e1eb690aac).

The trick is to get the JPDADebugger (and not the generic Debugger interface - which makes sense now that I think about it ).

JPDADebugger has an evaluate method which is what the CodeEvalutator uses.



But this is when you have a debugger attached. For more generic instrumentation of a running app I’d try JMX instead.

Yeah I got it working, now I can ungrab the mouse a bit more easily from the jME SDK.



To recap, this plugin does exactly the same as the workaround described by @teique

Menu: window -> show view -> expressions
add this expression: org.lwjgl.input.Mouse.setGrabbed(false)

but it is an action on the Debug menu. It is a quick hack so it does not do all the nice things like disable the menu item when the action is unavailable and so on.

The code for the plugin is located here: https://bitbucket.org/zoom/ungrablwjglmouse

I have an update site at: http://www.zoom.nu/netbeans/ungrabmouse/updates.xml but I can't make any promises that it will be up and updated, but for now you can install the plugin from there.

Only tested on my machine, no warranties, I'll not update it nor maintain it :)
1 Like