Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Breakpoint debug SelectionListener freeze eclipse and Win10 OS
Breakpoint debug SelectionListener freeze eclipse and Win10 OS [message #1814947] Mon, 23 September 2019 10:06 Go to next message
Beck Ye is currently offline Beck YeFriend
Messages: 2
Registered: October 2014
Junior Member
As show with below picture, when I debug SelectionListener with a breakpoint, the Shell, eclipse and OS got ANR,I have to use the windows task manager to stop the shell to get windows focus.


code as:
public class SWTExample {

Display d;

Shell s;

SWTExample() {
d = new Display();
s = new Shell(d,SWT.SHELL_TRIM);

s.setSize(390, 200);

s.setText("A Table Shell Example");
s.setLayout(new FillLayout());

Button t = new Button(s, SWT.BORDER);

t.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {

while (!s.isDisposed()) {
if (!d.readAndDispatch())

public static void main(String[] argv) {
new SWTExample();


I try photon, kepler, neon with java 8 and java11 is the same problem. so I guss the proplem is relative to my OS win10 since I use win7 is OK before.

  • Attachment: ddd.jpg
    (Size: 411.45KB, Downloaded 136 times)
Re: Breakpoint debug SelectionListener freeze eclipse and Win10 OS [message #1814967 is a reply to message #1814947] Mon, 23 September 2019 14:23 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 877
Registered: January 2012
Senior Member

Breakpoints in SWT can result in deadlocks due to how events are handled. The safest approach is to resort to printfs OR remote debugging from another machine.

Previous Topic:ToolTip on Table cells, Linux
Next Topic:SWT tab title text may not be ClearType
Goto Forum:

Current Time: Mon Apr 19 13:57:58 GMT 2021

Powered by FUDForum. Page generated in 0.01284 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top