--- a/UI/UserInterface.py Sun Nov 04 12:38:32 2018 +0100 +++ b/UI/UserInterface.py Sun Nov 04 17:20:11 2018 +0100 @@ -166,7 +166,7 @@ def __init__(self, app, locale, splash, plugin, disabledPlugins, noOpenAtStartup, noCrashOpenAtStartup, disableCrashSession, - restartArguments): + restartArguments, originalPathString): """ Constructor @@ -194,6 +194,8 @@ @param restartArguments list of command line parameters to be used for a restart @type list of str + @param originalPathString original PATH environment variable + @type str """ super(UserInterface, self).__init__() @@ -209,6 +211,8 @@ self.__disableCrashSession = disableCrashSession self.__disabledPlugins = disabledPlugins[:] + self.__originalPathString = originalPathString + self.__layoutType = Preferences.getUI("LayoutType") self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled") @@ -248,7 +252,7 @@ # Generate the debug server object from Debugger.DebugServer import DebugServer - debugServer = DebugServer() + debugServer = DebugServer(self.__originalPathString) # Create the background service object from Utilities.BackgroundService import BackgroundService @@ -698,9 +702,15 @@ splash.showMessage(self.tr("Reading Templates...")) self.templateViewer.readTemplates() - # now start the debug client + # now start the debug client with the most recently used virtual + # environment splash.showMessage(self.tr("Starting Debugger...")) - debugServer.startClient(False) + if Preferences.getShell("StartWithMostRecentlyUsedEnvironment"): + debugServer.startClient( + False, venvName=Preferences.getShell("LastVirtualEnvironment") + ) + else: + debugServer.startClient(False) # attributes for the network objects self.__networkManager = QNetworkAccessManager(self)