stop HotSwap if debug process died
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Thu, 13 Aug 2015 09:56:32 +0000 (12:56 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Thu, 13 Aug 2015 09:58:09 +0000 (12:58 +0300)
java/debugger/impl/src/com/intellij/debugger/impl/ReloadClassesWorker.java

index a7e3fdbadb1d4b87b6a0f81ce238b9295849e89a..7b3f46e27c8ec6e0fef7c85412e6de7f5d6be034 100644 (file)
@@ -121,6 +121,10 @@ class ReloadClassesWorker {
 
       int processedEntriesCount = 0;
       for (final Map.Entry<String, HotSwapFile> entry : modifiedClasses.entrySet()) {
+        // stop if process is finished already
+        if (debugProcess.isDetached() || debugProcess.isDetaching()) {
+          break;
+        }
         if (redefineProcessor.getProcessedClassesCount() == 0 && myProgress.isCancelled()) {
           // once at least one class has been actually reloaded, do not interrupt the whole process
           break;