diff -r 082d58e2415e -r 8eb6220f2bb7 Debugger/DebuggerInterfacePython.py --- a/Debugger/DebuggerInterfacePython.py Sun Nov 04 12:38:32 2018 +0100 +++ b/Debugger/DebuggerInterfacePython.py Sun Nov 04 17:20:11 2018 +0100 @@ -131,7 +131,7 @@ return proc - def startRemote(self, port, runInConsole, venvName): + def startRemote(self, port, runInConsole, venvName, originalPathString): """ Public method to start a remote Python interpreter. @@ -142,10 +142,14 @@ @type bool @param venvName name of the virtual environment to be used @type str + @param originalPathString original PATH environment variable + @type str @return client process object, a flag to indicate a network connection and the name of the interpreter in case of a local execution @rtype tuple of (QProcess, bool, str) """ + global origPathEnv + if not venvName: if self.__variant == "Python2": venvName = Preferences.getDebugger("Python2VirtualEnv") @@ -233,6 +237,8 @@ clientEnv = {} else: clientEnv = os.environ.copy() + if originalPathString: + clientEnv["PATH"] = originalPathString envlist = Utilities.parseEnvironmentString( Preferences.getDebugger("DebugEnvironment")) for el in envlist: @@ -284,7 +290,8 @@ return process, self.__isNetworked, interpreter - def startRemoteForProject(self, port, runInConsole, venvName): + def startRemoteForProject(self, port, runInConsole, venvName, + originalPathString): """ Public method to start a remote Python interpreter for a project. @@ -295,10 +302,14 @@ @type bool @param venvName name of the virtual environment to be used @type str + @param originalPathString original PATH environment variable + @type str @return client process object, a flag to indicate a network connection and the name of the interpreter in case of a local execution @rtype tuple of (QProcess, bool, str) """ + global origPathEnv + project = e5App().getObject("Project") if not project.isDebugPropertiesLoaded(): return None, self.__isNetworked, "" @@ -371,6 +382,8 @@ clientEnv = {} else: clientEnv = os.environ.copy() + if originalPathString: + clientEnv["PATH"] = originalPathString envlist = Utilities.parseEnvironmentString( project.getDebugProperty("ENVIRONMENTSTRING")) for el in envlist: