FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix restarting sketch in Debug mode when Run is pressed · processing/processing@7d55937 · GitHub

Repository navigation

Commit 7d55937

Browse files
committed
Fix restarting sketch in Debug mode when Run is pressed
Disconnect event of the old VM would arrive after the new VM was created, closing it instantly and leaving user without a running sketch.
1 parent aa2db6b commit 7d55937

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,12 @@ synchronized List<LineBreakpoint> getBreakpoints(String tabFilename) {
533533
* @param es Incoming set of events from VM
534534
*/
535535
public synchronized void vmEvent(EventSet es) {
536+
VirtualMachine vm = vm();
537+
if (vm != null && vm != es.virtualMachine()) {
538+
// This is no longer VM we are interested in,
539+
// we already cleaned up and run different VM now.
540+
return;
541+
}
536542
for (Event e : es) {
537543
log("*** VM Event: " + e);
538544
if (e instanceof VMStartEvent) {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL