--- a/Debugger/DebugServer.py Sun Jun 17 13:09:00 2018 +0200 +++ b/Debugger/DebugServer.py Sun Jun 17 16:56:10 2018 +0200 @@ -449,17 +449,21 @@ 'DebugClient/Type', self.clientType) def startClient(self, unplanned=True, clType=None, forProject=False, - runInConsole=False, interpreter=""): + runInConsole=False, venvName=""): """ Public method to start a debug client. - @keyparam unplanned flag indicating that the client has died (boolean) - @keyparam clType type of client to be started (string) - @keyparam forProject flag indicating a project related action (boolean) + @keyparam unplanned flag indicating that the client has died + @type bool + @keyparam clType type of client to be started + @type str + @keyparam forProject flag indicating a project related action + @type bool @keyparam runInConsole flag indicating to start the debugger in a - console window (boolean) - @keyparam interpreter interpreter to be used to execute the remote - side (string) + console window + @type bool + @keyparam venvName name of the virtual environment to be used + @type str """ self.running = False @@ -485,15 +489,15 @@ if not project.isDebugPropertiesLoaded(): self.clientProcess, isNetworked, clientInterpreter = \ self.debuggerInterface.startRemote( - self.serverPort(), runInConsole, interpreter) + self.serverPort(), runInConsole, venvName) else: self.clientProcess, isNetworked, clientInterpreter = \ self.debuggerInterface.startRemoteForProject( - self.serverPort(), runInConsole, interpreter) + self.serverPort(), runInConsole, venvName) else: self.clientProcess, isNetworked, clientInterpreter = \ self.debuggerInterface.startRemote( - self.serverPort(), runInConsole, interpreter) + self.serverPort(), runInConsole, venvName) if self.clientProcess: self.clientProcess.readyReadStandardError.connect( @@ -804,34 +808,46 @@ pass self.debuggerInterface.remoteEnvironment(envdict) - def remoteLoad(self, interpreter, fn, argv, wd, env, autoClearShell=True, + def remoteLoad(self, venvName, fn, argv, wd, env, autoClearShell=True, tracePython=False, autoContinue=True, forProject=False, runInConsole=False, autoFork=False, forkChild=False, clientType="", enableCallTrace=False): """ Public method to load a new program to debug. - @param interpreter interpreter to be used to execute the remote - side (string) - @param fn the filename to debug (string) - @param argv the commandline arguments to pass to the program (string) - @param wd the working directory for the program (string) - @param env environment settings (string) + @param venvName name of the virtual environment to be used + @type str + @param fn the filename to debug + @type str + @param argv the command line arguments to pass to the program + @type str + @param wd the working directory for the program + @type str + @param env environment parameter settings + @type str @keyparam autoClearShell flag indicating, that the interpreter window - should be cleared (boolean) + should be cleared + @type bool @keyparam tracePython flag indicating if the Python library should be - traced as well (boolean) + traced as well + @type bool @keyparam autoContinue flag indicating, that the debugger should not - stop at the first executable line (boolean) - @keyparam forProject flag indicating a project related action (boolean) + stop at the first executable line + @type bool + @keyparam forProject flag indicating a project related action + @type bool @keyparam runInConsole flag indicating to start the debugger in a - console window (boolean) - @keyparam autoFork flag indicating the automatic fork mode (boolean) + console window + @type bool + @keyparam autoFork flag indicating the automatic fork mode + @type bool @keyparam forkChild flag indicating to debug the child after forking - (boolean) - @keyparam clientType client type to be used (string) + @type bool + @keyparam clientType client type to be used + @type str @keyparam enableCallTrace flag indicating to enable the call trace - function (boolean) + function + @type bool """ self.__autoClearShell = autoClearShell self.__autoContinue = autoContinue @@ -846,7 +862,7 @@ except KeyError: self.__setClientType('Python3') # assume it is a Python3 file self.startClient(False, forProject=forProject, - runInConsole=runInConsole, interpreter=interpreter) + runInConsole=runInConsole, venvName=venvName) self.setCallTraceEnabled(enableCallTrace) self.remoteEnvironment(env) @@ -858,27 +874,36 @@ self.__restoreBreakpoints() self.__restoreWatchpoints() - def remoteRun(self, interpreter, fn, argv, wd, env, autoClearShell=True, + def remoteRun(self, venvName, fn, argv, wd, env, autoClearShell=True, forProject=False, runInConsole=False, autoFork=False, forkChild=False, clientType=""): """ Public method to load a new program to run. - @param interpreter interpreter to be used to execute the remote - side (string) - @param fn the filename to run (string) - @param argv the commandline arguments to pass to the program (string) - @param wd the working directory for the program (string) - @param env environment settings (string) + @param venvName name of the virtual environment to be used + @type str + @param fn the filename to debug + @type str + @param argv the command line arguments to pass to the program + @type str + @param wd the working directory for the program + @type str + @param env environment parameter settings + @type str @keyparam autoClearShell flag indicating, that the interpreter window - should be cleared (boolean) - @keyparam forProject flag indicating a project related action (boolean) + should be cleared + @type bool + @keyparam forProject flag indicating a project related action + @type bool @keyparam runInConsole flag indicating to start the debugger in a - console window (boolean) - @keyparam autoFork flag indicating the automatic fork mode (boolean) + console window + @type bool + @keyparam autoFork flag indicating the automatic fork mode + @type bool @keyparam forkChild flag indicating to debug the child after forking - (boolean) - @keyparam clientType client type to be used (string) + @type bool + @keyparam clientType client type to be used + @type str """ self.__autoClearShell = autoClearShell @@ -892,7 +917,7 @@ except KeyError: self.__setClientType('Python3') # assume it is a Python3 file self.startClient(False, forProject=forProject, - runInConsole=runInConsole, interpreter=interpreter) + runInConsole=runInConsole, venvName=venvName) self.remoteEnvironment(env) @@ -900,26 +925,35 @@ self.debugging = False self.running = True - def remoteCoverage(self, interpreter, fn, argv, wd, env, + def remoteCoverage(self, venvName, fn, argv, wd, env, autoClearShell=True, erase=False, forProject=False, runInConsole=False, clientType=""): """ Public method to load a new program to collect coverage data. - @param interpreter interpreter to be used to execute the remote - side (string) - @param fn the filename to run (string) - @param argv the commandline arguments to pass to the program (string) - @param wd the working directory for the program (string) - @param env environment settings (string) + @param venvName name of the virtual environment to be used + @type str + @param fn the filename to debug + @type str + @param argv the command line arguments to pass to the program + @type str + @param wd the working directory for the program + @type str + @param env environment parameter settings + @type str @keyparam autoClearShell flag indicating, that the interpreter window - should be cleared (boolean) + should be cleared + @type bool @keyparam erase flag indicating that coverage info should be - cleared first (boolean) - @keyparam forProject flag indicating a project related action (boolean) + cleared first + @type bool + @keyparam forProject flag indicating a project related action + @type bool @keyparam runInConsole flag indicating to start the debugger in a - console window (boolean) - @keyparam clientType client type to be used (string) + console window + @type bool + @keyparam clientType client type to be used + @type str """ self.__autoClearShell = autoClearShell @@ -933,7 +967,7 @@ except KeyError: self.__setClientType('Python3') # assume it is a Python3 file self.startClient(False, forProject=forProject, - runInConsole=runInConsole, interpreter=interpreter) + runInConsole=runInConsole, venvName=venvName) self.remoteEnvironment(env) @@ -941,26 +975,35 @@ self.debugging = False self.running = True - def remoteProfile(self, interpreter, fn, argv, wd, env, + def remoteProfile(self, venvName, fn, argv, wd, env, autoClearShell=True, erase=False, forProject=False, runInConsole=False, clientType=""): """ Public method to load a new program to collect profiling data. - @param interpreter interpreter to be used to execute the remote - side (string) - @param fn the filename to run (string) - @param argv the commandline arguments to pass to the program (string) - @param wd the working directory for the program (string) - @param env environment settings (string) + @param venvName name of the virtual environment to be used + @type str + @param fn the filename to debug + @type str + @param argv the command line arguments to pass to the program + @type str + @param wd the working directory for the program + @type str + @param env environment parameter settings + @type str @keyparam autoClearShell flag indicating, that the interpreter window - should be cleared (boolean) - @keyparam erase flag indicating that timing info should be cleared - first (boolean) - @keyparam forProject flag indicating a project related action (boolean) + should be cleared + @type bool + @keyparam erase flag indicating that coverage info should be + cleared first + @type bool + @keyparam forProject flag indicating a project related action + @type bool @keyparam runInConsole flag indicating to start the debugger in a - console window (boolean) - @keyparam clientType client type to be used (string) + console window + @type bool + @keyparam clientType client type to be used + @type str """ self.__autoClearShell = autoClearShell @@ -974,7 +1017,7 @@ except KeyError: self.__setClientType('Python3') # assume it is a Python3 file self.startClient(False, forProject=forProject, - runInConsole=runInConsole, interpreter=interpreter) + runInConsole=runInConsole, venvName=venvName) self.remoteEnvironment(env)