EDU-475 Step over in debugger doesn't work for unresolved reference
authorLiana Bakradze <liana.bakradze@jetbrains.com>
Fri, 15 Apr 2016 12:40:26 +0000 (15:40 +0300)
committerLiana Bakradze <liana.bakradze@jetbrains.com>
Fri, 15 Apr 2016 12:44:20 +0000 (15:44 +0300)
python/educational-python/src/com/jetbrains/python/edu/debugger/PyEduDebugProcess.java

index 4783df316a85040028c044808ba761c63a8ef55a..fd0c6f2f38e9982ba3124d0755c69e39d2b2c313 100644 (file)
@@ -57,12 +57,13 @@ class PyEduDebugProcess extends PyDebugProcess {
       return Collections.emptyList();
     }
     final String helpersPath = PythonHelpersLocator.getHelpersRoot().getPath();
-    return Collections2.filter(frames, new Predicate<PyStackFrameInfo>() {
+    Collection<PyStackFrameInfo> filteredFrames = Collections2.filter(frames, new Predicate<PyStackFrameInfo>() {
       @Override
       public boolean apply(PyStackFrameInfo frame) {
         String file = frame.getPosition().getFile();
         return !FileUtil.isAncestor(helpersPath, file, false);
       }
     });
+    return !filteredFrames.isEmpty() ? filteredFrames : frames;
   }
 }