eric6/Sessions/SessionFile.py

changeset 8164
c8b88e73b56f
parent 8163
29fb6d420a25
child 8218
7c09585bd960
diff -r 29fb6d420a25 -r c8b88e73b56f eric6/Sessions/SessionFile.py
--- a/eric6/Sessions/SessionFile.py	Mon Mar 15 17:55:48 2021 +0100
+++ b/eric6/Sessions/SessionFile.py	Tue Mar 16 17:29:42 2021 +0100
@@ -273,12 +273,14 @@
         dbs = e5App().getObject("DebugServer")
         
         # step 1: multi project and project
+        # =================================
         if sessionDict["MultiProject"]:
             multiProject.openMultiProject(sessionDict["MultiProject"], False)
         if sessionDict["Project"]:
             project.openProject(sessionDict["Project"], False)
         
         # step 2: (project) filenames and the active editor
+        # =================================================
         vm.setSplitOrientation(sessionDict["ViewManagerSplits"]["Orientation"])
         vm.setSplitCount(sessionDict["ViewManagerSplits"]["Count"])
         
@@ -306,15 +308,26 @@
                     ed.setCursorPosition(*editorDict["Cursor"])
         
         # step 3: breakpoints
+        # ===================
         bpModel = dbs.getBreakPointModel()
         bpModel.addBreakPoints(sessionDict["Breakpoints"])
         
         # step 4: watch expressions
+        # =========================
         wpModel = dbs.getWatchPointModel()
         wpModel.addWatchPoints(sessionDict["Watchpoints"])
         
         # step 5: debug info
+        # ==================
         debugInfoDict = sessionDict["DebugInfo"]
+        
+        # adjust for newer session types
+        if "GlobalConfigOverride" not in debugInfoDict:
+            debugInfoDict["GlobalConfigOverride"] = {
+                "enable": False,
+                "redirect": True,
+            }
+        
         dbg.lastUsedVenvName = debugInfoDict["VirtualEnv"]
         dbg.setArgvHistory(debugInfoDict["CommandLine"])
         dbg.setWdHistory(debugInfoDict["WorkingDirectory"])
@@ -347,6 +360,7 @@
             )
         
         # step 6: bookmarks
+        # =================
         for bookmark in sessionDict["Bookmarks"]:
             editor = vm.getOpenEditor(bookmark["Filename"])
             if editor is not None:
@@ -354,12 +368,14 @@
                     editor.toggleBookmark(lineno)
         
         # step 7: state of the various project browsers
+        # =============================================
         for browserState in sessionDict["ProjectBrowserStates"]:
             browser = projectBrowser.getProjectBrowser(browserState["Name"])
             if browser is not None:
                 browser.expandItemsByName(browserState["ExpandedItems"])
         
         # step 8: active window
+        # =====================
         if sessionDict["ActiveWindow"]:
             vm.openFiles(sessionDict["ActiveWindow"]["Filename"])
             ed = vm.getOpenEditor(sessionDict["ActiveWindow"]["Filename"])

eric ide

mercurial