Bug prevented breakpoint on newly edited files. On rerun, breakpoints were active again. Windows only.

Mon, 20 Mar 2017 22:24:44 +0100

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Mon, 20 Mar 2017 22:24:44 +0100
changeset 5644
509d3c9666b0
parent 5640
2e046f1818ed
child 5645
e8f9bf06b804

Bug prevented breakpoint on newly edited files. On rerun, breakpoints were active again. Windows only.

DebugClients/Python/DebugBase.py file | annotate | diff | comparison | revisions
--- a/DebugClients/Python/DebugBase.py	Mon Mar 20 19:31:22 2017 +0100
+++ b/DebugClients/Python/DebugBase.py	Mon Mar 20 22:24:44 2017 +0100
@@ -562,16 +562,13 @@
         try:
             return self._fnCache[fn]
         except KeyError:
-            if fn and fn != frame.f_code.co_filename:
-                absFilename = os.path.abspath(fn)
-                if absFilename.endswith(('.pyc', '.pyo')):
-                    fixedName = absFilename[:-1]
-                    if not os.path.exists(fixedName):
-                        fixedName = absFilename
-                else:
+            absFilename = os.path.abspath(fn)
+            if absFilename.endswith(('.pyc', '.pyo')):
+                fixedName = absFilename[:-1]
+                if not os.path.exists(fixedName):
                     fixedName = absFilename
             else:
-                fixedName = frame.f_code.co_filename
+                fixedName = absFilename
             # update cache
             self._fnCache[fn] = fixedName
             return fixedName

eric ide

mercurial