Mon, 14 Dec 2020 19:23:25 +0100
Debugger: removed the 'fork' options for the Run and Debug start options because they are obsolete.
--- a/eric6/Debugger/DebugServer.py Sun Dec 13 19:54:19 2020 +0100 +++ b/eric6/Debugger/DebugServer.py Mon Dec 14 19:23:25 2020 +0100 @@ -474,18 +474,18 @@ """ Public method to start a debug client. - @keyparam unplanned flag indicating that the client has died + @param unplanned flag indicating that the client has died @type bool - @keyparam clType type of client to be started + @param clType type of client to be started @type str - @keyparam forProject flag indicating a project related action + @param forProject flag indicating a project related action @type bool - @keyparam runInConsole flag indicating to start the debugger in a + @param runInConsole flag indicating to start the debugger in a console window @type bool - @keyparam venvName name of the virtual environment to be used + @param venvName name of the virtual environment to be used @type str - @keyparam workingDir directory to start the debugger client in + @param workingDir directory to start the debugger client in @type str """ self.running = False @@ -920,8 +920,7 @@ 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, + runInConsole=False, clientType="", enableCallTrace=False, enableMultiprocess=False, multiprocessNoDebug=""): """ Public method to load a new program to debug. @@ -936,27 +935,23 @@ @type str @param env environment parameter settings @type str - @keyparam autoClearShell flag indicating, that the interpreter window + @param autoClearShell flag indicating, that the interpreter window should be cleared @type bool - @keyparam tracePython flag indicating if the Python library should be + @param tracePython flag indicating if the Python library should be traced as well @type bool - @keyparam autoContinue flag indicating, that the debugger should not + @param autoContinue flag indicating, that the debugger should not stop at the first executable line @type bool - @keyparam forProject flag indicating a project related action + @param forProject flag indicating a project related action @type bool - @keyparam runInConsole flag indicating to start the debugger in a + @param runInConsole flag indicating to start the debugger in a console window @type bool - @keyparam autoFork flag indicating the automatic fork mode - @type bool - @keyparam forkChild flag indicating to debug the child after forking - @type bool - @keyparam clientType client type to be used + @param clientType client type to be used @type str - @keyparam enableCallTrace flag indicating to enable the call trace + @param enableCallTrace flag indicating to enable the call trace function @type bool @param enableMultiprocess flag indicating to perform multiprocess @@ -996,7 +991,7 @@ self.remoteEnvironment(env) self.debuggerInterface.remoteLoad( - fn, argv, wd, tracePython, autoContinue, autoFork, forkChild, + fn, argv, wd, tracePython, autoContinue, enableMultiprocess=enableMultiprocess ) self.debugging = True @@ -1006,8 +1001,7 @@ self.__restoreNoDebugList() def remoteRun(self, venvName, fn, argv, wd, env, autoClearShell=True, - forProject=False, runInConsole=False, autoFork=False, - forkChild=False, clientType=""): + forProject=False, runInConsole=False, clientType=""): """ Public method to load a new program to run. @@ -1021,19 +1015,15 @@ @type str @param env environment parameter settings @type str - @keyparam autoClearShell flag indicating, that the interpreter window + @param autoClearShell flag indicating, that the interpreter window should be cleared @type bool - @keyparam forProject flag indicating a project related action + @param forProject flag indicating a project related action @type bool - @keyparam runInConsole flag indicating to start the debugger in a + @param runInConsole flag indicating to start the debugger in a console window @type bool - @keyparam autoFork flag indicating the automatic fork mode - @type bool - @keyparam forkChild flag indicating to debug the child after forking - @type bool - @keyparam clientType client type to be used + @param clientType client type to be used @type str """ self.__autoClearShell = autoClearShell @@ -1063,7 +1053,7 @@ self.remoteEnvironment(env) - self.debuggerInterface.remoteRun(fn, argv, wd, autoFork, forkChild) + self.debuggerInterface.remoteRun(fn, argv, wd) self.debugging = False self.running = True @@ -1083,18 +1073,18 @@ @type str @param env environment parameter settings @type str - @keyparam autoClearShell flag indicating, that the interpreter window + @param autoClearShell flag indicating, that the interpreter window should be cleared @type bool - @keyparam erase flag indicating that coverage info should be + @param erase flag indicating that coverage info should be cleared first @type bool - @keyparam forProject flag indicating a project related action + @param forProject flag indicating a project related action @type bool - @keyparam runInConsole flag indicating to start the debugger in a + @param runInConsole flag indicating to start the debugger in a console window @type bool - @keyparam clientType client type to be used + @param clientType client type to be used @type str """ self.__autoClearShell = autoClearShell @@ -1144,18 +1134,18 @@ @type str @param env environment parameter settings @type str - @keyparam autoClearShell flag indicating, that the interpreter window + @param autoClearShell flag indicating, that the interpreter window should be cleared @type bool - @keyparam erase flag indicating that coverage info should be + @param erase flag indicating that coverage info should be cleared first @type bool - @keyparam forProject flag indicating a project related action + @param forProject flag indicating a project related action @type bool - @keyparam runInConsole flag indicating to start the debugger in a + @param runInConsole flag indicating to start the debugger in a console window @type bool - @keyparam clientType client type to be used + @param clientType client type to be used @type str """ self.__autoClearShell = autoClearShell
--- a/eric6/Debugger/DebugUI.py Sun Dec 13 19:54:19 2020 +0100 +++ b/eric6/Debugger/DebugUI.py Mon Dec 14 19:23:25 2020 +0100 @@ -102,11 +102,6 @@ Preferences.Prefs.settings.value('DebugInfo/TracePython', False)) self.autoContinue = Preferences.toBool( Preferences.Prefs.settings.value('DebugInfo/AutoContinue', True)) - self.forkAutomatically = Preferences.toBool( - Preferences.Prefs.settings.value( - 'DebugInfo/ForkAutomatically', False)) - self.forkIntoChild = Preferences.toBool( - Preferences.Prefs.settings.value('DebugInfo/ForkIntoChild', False)) self.enableMultiprocess = Preferences.toBool( Preferences.Prefs.settings.value( 'DebugInfo/EnableMultiprocess', False)) @@ -961,10 +956,6 @@ Preferences.Prefs.settings.setValue( 'DebugInfo/AutoContinue', self.autoContinue) Preferences.Prefs.settings.setValue( - 'DebugInfo/ForkAutomatically', self.forkAutomatically) - Preferences.Prefs.settings.setValue( - 'DebugInfo/ForkIntoChild', self.forkIntoChild) - Preferences.Prefs.settings.setValue( 'DebugInfo/EnableMultiprocess', self.enableMultiprocess) Preferences.Prefs.settings.setValue( 'DebugInfo/MultiprocessNoDebugHistory', @@ -1922,13 +1913,10 @@ dlg = StartDialog( cap, self.lastUsedVenvName, self.argvHistory, self.wdHistory, self.envHistory, self.exceptions, self.ui, 1, - autoClearShell=self.autoClearShell, - autoFork=self.forkAutomatically, - forkChild=self.forkIntoChild) + autoClearShell=self.autoClearShell) if dlg.exec() == QDialog.Accepted: (lastUsedVenvName, argv, wd, env, exceptions, clearShell, console) = dlg.getData() - forkAutomatically, forkIntoChild = dlg.getRunData() if runProject: fn = self.project.getMainScript(True) @@ -1993,10 +1981,6 @@ # Save the run in console flag self.runInConsole = console - # Save the forking flags - self.forkAutomatically = forkAutomatically - self.forkIntoChild = forkIntoChild - # Hide all error highlights self.viewmanager.unhighlight() @@ -2012,8 +1996,7 @@ self.debugServer.remoteRun( lastUsedVenvName, fn, argv, wd, env, autoClearShell=self.autoClearShell, forProject=runProject, - runInConsole=console, autoFork=forkAutomatically, - forkChild=forkIntoChild, clientType=self.clientType) + runInConsole=console, clientType=self.clientType) self.stopAct.setEnabled(True) @@ -2063,16 +2046,14 @@ cap, self.lastUsedVenvName, self.argvHistory, self.wdHistory, self.envHistory, self.exceptions, self.ui, 0, tracePython=self.tracePython, autoClearShell=self.autoClearShell, - autoContinue=self.autoContinue, autoFork=self.forkAutomatically, - forkChild=self.forkIntoChild, + autoContinue=self.autoContinue, enableMultiprocess=self.enableMultiprocess, multiprocessNoDebugHistory=self.multiprocessNoDebugHistory) if dlg.exec() == QDialog.Accepted: (lastUsedVenvName, argv, wd, env, exceptions, clearShell, console) = dlg.getData() - (tracePython, autoContinue, forkAutomatically, forkIntoChild, - enableMultiprocess, multiprocessNoDebug, - ) = dlg.getDebugData() + (tracePython, autoContinue, enableMultiprocess, + multiprocessNoDebug) = dlg.getDebugData() if debugProject: fn = self.project.getMainScript(True) @@ -2143,10 +2124,6 @@ # Save the auto continue flag self.autoContinue = autoContinue - # Save the forking flags - self.forkAutomatically = forkAutomatically - self.forkIntoChild = forkIntoChild - # Save the multiprocess debugging data self.enableMultiprocess = enableMultiprocess self.setMultiprocessNoDebugHistory(multiprocessNoDebug) @@ -2174,8 +2151,7 @@ autoClearShell=self.autoClearShell, tracePython=tracePython, autoContinue=autoContinue, forProject=debugProject, - runInConsole=console, autoFork=forkAutomatically, - forkChild=forkIntoChild, clientType=self.clientType, + runInConsole=console, clientType=self.clientType, enableCallTrace=enableCallTrace, enableMultiprocess=enableMultiprocess, multiprocessNoDebug=multiprocessNoDebug) @@ -2264,8 +2240,6 @@ autoContinue=self.autoContinue, forProject=forProject, runInConsole=self.runInConsole, - autoFork=self.forkAutomatically, - forkChild=self.forkIntoChild, clientType=self.clientType, enableCallTrace=enableCallTrace, enableMultiprocess=self.enableMultiprocess, @@ -2281,8 +2255,6 @@ autoClearShell=self.autoClearShell, forProject=forProject, runInConsole=self.runInConsole, - autoFork=self.forkAutomatically, - forkChild=self.forkIntoChild, clientType=self.clientType) elif self.lastStartAction in [5, 6]:
--- a/eric6/Debugger/DebuggerInterfaceNone.py Sun Dec 13 19:54:19 2020 +0100 +++ b/eric6/Debugger/DebuggerInterfaceNone.py Mon Dec 14 19:23:25 2020 +0100 @@ -133,8 +133,7 @@ return def remoteLoad(self, fn, argv, wd, traceInterpreter=False, - autoContinue=True, autoFork=False, forkChild=False, - enableMultiprocess=False): + autoContinue=True, enableMultiprocess=False): """ Public method to load a new program to debug. @@ -150,17 +149,13 @@ @param autoContinue flag indicating, that the debugger should not stop at the first executable line @type bool - @param autoFork flag indicating the automatic fork mode - @type bool - @param forkChild flag indicating to debug the child after forking - @type bool @param enableMultiprocess flag indicating to perform multiprocess debugging @type bool """ return - def remoteRun(self, fn, argv, wd, autoFork=False, forkChild=False): + def remoteRun(self, fn, argv, wd): """ Public method to load a new program to run. @@ -170,10 +165,6 @@ @type str @param wd the working directory for the program @type str - @param autoFork flag indicating the automatic fork mode - @type bool - @param forkChild flag indicating to debug the child after forking - @type bool """ return
--- a/eric6/Debugger/DebuggerInterfacePython.py Sun Dec 13 19:54:19 2020 +0100 +++ b/eric6/Debugger/DebuggerInterfacePython.py Mon Dec 14 19:23:25 2020 +0100 @@ -671,10 +671,8 @@ self.__sendJsonCommand("RequestEnvironment", {"environment": env}, self.__master) - # TODO: remove autoFork and forkChild def remoteLoad(self, fn, argv, wd, traceInterpreter=False, - autoContinue=True, autoFork=False, forkChild=False, - enableMultiprocess=False): + autoContinue=True, enableMultiprocess=False): """ Public method to load a new program to debug. @@ -690,10 +688,6 @@ @param autoContinue flag indicating, that the debugger should not stop at the first executable line @type bool - @param autoFork flag indicating the automatic fork mode - @type bool - @param forkChild flag indicating to debug the child after forking - @type bool @param enableMultiprocess flag indicating to perform multiprocess debugging @type bool @@ -709,13 +703,10 @@ "filename": fn, "argv": Utilities.parseOptionString(argv), "traceInterpreter": traceInterpreter, - "autofork": autoFork, - "forkChild": forkChild, "multiprocess": enableMultiprocess, }, self.__master) - # TODO: remove autoFork and forkChild - def remoteRun(self, fn, argv, wd, autoFork=False, forkChild=False): + def remoteRun(self, fn, argv, wd): """ Public method to load a new program to run. @@ -725,10 +716,6 @@ @type str @param wd the working directory for the program @type str - @param autoFork flag indicating the automatic fork mode - @type bool - @param forkChild flag indicating to debug the child after forking - @type bool """ self.__scriptName = os.path.abspath(fn) @@ -738,8 +725,6 @@ "workdir": wd, "filename": fn, "argv": Utilities.parseOptionString(argv), - "autofork": autoFork, - "forkChild": forkChild, }, self.__master) def remoteCoverage(self, fn, argv, wd, erase=False):
--- a/eric6/Debugger/StartDebugDialog.ui Sun Dec 13 19:54:19 2020 +0100 +++ b/eric6/Debugger/StartDebugDialog.ui Mon Dec 14 19:23:25 2020 +0100 @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>550</width> - <height>332</height> + <height>276</height> </rect> </property> <property name="windowTitle"> @@ -296,46 +296,6 @@ </widget> </item> <item> - <widget class="QGroupBox" name="groupBox"> - <property name="title"> - <string>Forking</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QCheckBox" name="forkModeCheckBox"> - <property name="toolTip"> - <string>Select to go through the fork without asking</string> - </property> - <property name="whatsThis"> - <string><b>Fork without pausing</b> -<p>Select to go through the fork without asking making the forking decision based on the Parent/Child selection.</p></string> - </property> - <property name="text"> - <string>Fork without pausing</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="forkChildCheckBox"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="toolTip"> - <string>Select to debug the child process after forking</string> - </property> - <property name="whatsThis"> - <string><b>Debug Child Process</b> -<p>Select to debug the child process after forking. If it is not selected, the parent process will be debugged. This has no effect, if forking without pausing is not selected.</p></string> - </property> - <property name="text"> - <string>Follow Child Process</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> <widget class="QDialogButtonBox" name="buttonBox"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -368,8 +328,6 @@ <tabstop>autoContinueCheckBox</tabstop> <tabstop>multiprocessGroup</tabstop> <tabstop>multiprocessNoDebugCombo</tabstop> - <tabstop>forkModeCheckBox</tabstop> - <tabstop>forkChildCheckBox</tabstop> </tabstops> <resources/> <connections> @@ -405,21 +363,5 @@ </hint> </hints> </connection> - <connection> - <sender>forkModeCheckBox</sender> - <signal>toggled(bool)</signal> - <receiver>forkChildCheckBox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel"> - <x>185</x> - <y>279</y> - </hint> - <hint type="destinationlabel"> - <x>528</x> - <y>279</y> - </hint> - </hints> - </connection> </connections> </ui>
--- a/eric6/Debugger/StartDialog.py Sun Dec 13 19:54:19 2020 +0100 +++ b/eric6/Debugger/StartDialog.py Mon Dec 14 19:23:25 2020 +0100 @@ -28,8 +28,7 @@ exceptions, parent=None, dialogType=0, modfuncList=None, tracePython=False, autoClearShell=True, autoContinue=True, - autoFork=False, forkChild=False, enableMultiprocess=False, - multiprocessNoDebugHistory=None): + enableMultiprocess=False, multiprocessNoDebugHistory=None): """ Constructor @@ -67,10 +66,6 @@ @param autoContinue flag indicating, that the debugger should not stop at the first executable line @type bool - @param autoFork flag indicating the automatic fork mode - @type bool - @param forkChild flag indicating to debug the child after forking - @type bool @param enableMultiprocess flag indicating the support for multi process debugging @type bool @@ -138,8 +133,6 @@ self.ui.tracePythonCheckBox.setChecked(tracePython) self.ui.tracePythonCheckBox.show() self.ui.autoContinueCheckBox.setChecked(autoContinue) - self.ui.forkModeCheckBox.setChecked(autoFork) - self.ui.forkChildCheckBox.setChecked(forkChild) self.ui.multiprocessGroup.setEnabled(enableMultiprocessGlobal) self.ui.multiprocessGroup.setChecked( enableMultiprocess & enableMultiprocessGlobal) @@ -149,10 +142,6 @@ multiprocessNoDebugHistory) self.ui.multiprocessNoDebugCombo.setCurrentIndex(0) - if dialogType == 1: # start run dialog - self.ui.forkModeCheckBox.setChecked(autoFork) - self.ui.forkChildCheckBox.setChecked(forkChild) - if dialogType == 3: # start coverage or profile dialog self.ui.eraseCheckBox.setChecked(True) @@ -198,39 +187,19 @@ @return a tuple of a flag indicating, if the Python library should be traced as well, a flag indicating, that the debugger should not - stop at the first executable line, a flag indicating, that the - debugger should fork automatically, a flag indicating, that the - debugger should debug the child process after forking - automatically, a flag indicating to support multi process debugging - and a space separated list of programs not to be debugged - @rtype tuple of (bool, bool, bool, bool, bool, str) + stop at the first executable line, a flag indicating to support + multi process debugging and a space separated list of programs not + to be debugged + @rtype tuple of (bool, bool, bool, str) """ if self.dialogType == 0: return (self.ui.tracePythonCheckBox.isChecked(), self.ui.autoContinueCheckBox.isChecked(), - self.ui.forkModeCheckBox.isChecked(), - self.ui.forkChildCheckBox.isChecked(), self.ui.multiprocessGroup.isChecked(), self.ui.multiprocessNoDebugCombo.currentText()) else: - return (False, False, False, False, False, []) - - def getRunData(self): - """ - Public method to retrieve the debug related data entered into this - dialog. - - @return a tuple of a flag indicating, that the debugger should fork - automatically (boolean) and a flag indicating, that the debugger - should debug the child process after forking automatically - (boolean) - """ - if self.dialogType == 1: - return (self.ui.forkModeCheckBox.isChecked(), - self.ui.forkChildCheckBox.isChecked()) - else: - return (False, False) - + return (False, False, False, "") + def getCoverageData(self): """ Public method to retrieve the coverage related data entered into this
--- a/eric6/Debugger/StartRunDialog.ui Sun Dec 13 19:54:19 2020 +0100 +++ b/eric6/Debugger/StartRunDialog.ui Mon Dec 14 19:23:25 2020 +0100 @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>550</width> - <height>303</height> + <height>192</height> </rect> </property> <property name="windowTitle"> @@ -211,46 +211,6 @@ </layout> </item> <item> - <widget class="QGroupBox" name="groupBox"> - <property name="title"> - <string>Forking</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QCheckBox" name="forkModeCheckBox"> - <property name="toolTip"> - <string>Select to go through the fork without asking</string> - </property> - <property name="whatsThis"> - <string><b>Fork without pausing</b> -<p>Select to go through the fork without asking making the forking decision based on the Parent/Child selection.</p></string> - </property> - <property name="text"> - <string>Fork without pausing</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="forkChildCheckBox"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="toolTip"> - <string>Select to debug the child process after forking</string> - </property> - <property name="whatsThis"> - <string><b>Debug Child Process</b> -<p>Select to debug the child process after forking. If it is not selected, the parent process will be debugged. This has no effect, if forking without pausing is not selected.</p></string> - </property> - <property name="text"> - <string>Follow Child Process</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> <widget class="QDialogButtonBox" name="buttonBox"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -279,8 +239,6 @@ <tabstop>exceptionCheckBox</tabstop> <tabstop>clearShellCheckBox</tabstop> <tabstop>consoleCheckBox</tabstop> - <tabstop>forkModeCheckBox</tabstop> - <tabstop>forkChildCheckBox</tabstop> </tabstops> <resources/> <connections> @@ -316,21 +274,5 @@ </hint> </hints> </connection> - <connection> - <sender>forkModeCheckBox</sender> - <signal>toggled(bool)</signal> - <receiver>forkChildCheckBox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel"> - <x>142</x> - <y>249</y> - </hint> - <hint type="destinationlabel"> - <x>528</x> - <y>249</y> - </hint> - </hints> - </connection> </connections> </ui>