Skip to content

Commit fab52a4

Browse files
committed
Threading: touch UI only on AWT
1 parent 6f53282 commit fab52a4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

java/src/processing/mode/java/Debugger.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import com.sun.jdi.*;
2424
import com.sun.jdi.event.*;
25+
import com.sun.jdi.event.Event;
2526
import com.sun.jdi.request.*;
2627

2728
import java.io.*;
@@ -661,7 +662,12 @@ public void run() {
661662
// disallow stepping into invisible lines
662663
if (!locationIsVisible(se.location())) {
663664
// TODO: this leads to stepping, should it run on the EDT?
664-
stepOutIntoViewOrContinue();
665+
javax.swing.SwingUtilities.invokeLater(new Runnable() {
666+
@Override
667+
public void run() {
668+
stepOutIntoViewOrContinue();
669+
}
670+
});
665671
}
666672
}
667673

0 commit comments

Comments
 (0)