I have found a solution to long running problem: When breakpoint in debugger is hit while the debugee holds mouse capture, it was impossible to use (captured) mouse.
The solution is based in invoking "xdotool key XF86Ungrab" command. Unfortunately this needs xdotool to be installed; for now I have only changed install script for debian apt-get. If you want the support in your favorit distro, please let me know the name of package...