Debugging in AWT hangs the X Window System
It is not possible to grab focus of the blocked Java application in X Window System.
This problem is resolved in NetBeans 7.1 and newer by bug #93076. The bug persists in older NetBeans versions.
- Use a j2se project
- Select a package and invoke New | JFrame Form ... in its popup menu
- Press Finish
- Go to Design view of opened editor
- Choose Combo Box in Palette an put it into the form
- Double click on the combo box in Inspector window
- In opened Java editor insert System.out.println("selected"); into the created jComboBox1ActionPerformed method
- Toggle line breakpoint on the inserted line
- Invoke Debug File on the created form from Projects view
- In opened frame select an item in the combo box
IDE will show frozen debugged application with combobox popup menu holding system focus. To fix the issue debugged application process must be killed remotely or from textual console.
- Displaying your debug process to another screen avoids this kind of problems.
- Another solution is to set AllowDeactivateGrabs option in xorg.conf and then use Ctrl+Alt+Keypad-Divide key sequence to deactivate any active keyboard and mouse grabs. See man xorg.conf for details.
This problem was reported as bug #6517045.