Thu, 12 Jul 2018 19:26:03 +0200
Debugger: changed code to prevent the right side bar or toolbox to be shown when the debugger has exited or was restarted via the shell.
--- a/APIs/Python3/eric6.api Thu Jul 12 19:23:38 2018 +0200 +++ b/APIs/Python3/eric6.api Thu Jul 12 19:26:03 2018 +0200 @@ -431,6 +431,7 @@ eric6.Debugger.DebugServer.DebugServer.getWatchPointModel?4() eric6.Debugger.DebugServer.DebugServer.isClientProcessUp?4() eric6.Debugger.DebugServer.DebugServer.isConnected?4() +eric6.Debugger.DebugServer.DebugServer.isDebugging?4() eric6.Debugger.DebugServer.DebugServer.passiveDebugStarted?7 eric6.Debugger.DebugServer.DebugServer.passiveStartUp?4(fn, exc) eric6.Debugger.DebugServer.DebugServer.preferencesChanged?4() @@ -461,6 +462,7 @@ eric6.Debugger.DebugServer.DebugServer.remoteUTRun?4() eric6.Debugger.DebugServer.DebugServer.remoteUTStop?4() eric6.Debugger.DebugServer.DebugServer.setCallTraceEnabled?4(on) +eric6.Debugger.DebugServer.DebugServer.setDebugging?4(on) eric6.Debugger.DebugServer.DebugServer.shutdownServer?4() eric6.Debugger.DebugServer.DebugServer.signalClientBanner?4(version, platform, debugClient) eric6.Debugger.DebugServer.DebugServer.signalClientBreakConditionError?4(filename, lineno)
--- a/Debugger/DebugServer.py Thu Jul 12 19:23:38 2018 +0200 +++ b/Debugger/DebugServer.py Thu Jul 12 19:26:03 2018 +0200 @@ -474,6 +474,7 @@ if not self.passive or not self.passiveClientExited: if self.debuggerInterface and self.debuggerInterface.isConnected(): self.shutdownServer() + self.debugging = False self.clientGone.emit(unplanned and self.debugging) if clType: @@ -1489,6 +1490,7 @@ self.clientExit.emit(int(status), message) if Preferences.getDebugger("AutomaticReset") or (self.running and not self.debugging): + self.debugging = False self.startClient(False) if self.passive: self.__createDebuggerInterface("None") @@ -1732,3 +1734,21 @@ @return flag indicating a connection (boolean) """ return self.debuggerInterface and self.debuggerInterface.isConnected() + + def isDebugging(self): + """ + Public method to test, if the debug server is debugging. + + @return flag indicating the debugging state + @rtype bool + """ + return self.debugging + + def setDebugging(self, on): + """ + Public method to set the debugging state. + + @param on flag indicating the new debugging state + @type bool + """ + self.debugging = on
--- a/Debugger/DebugUI.py Thu Jul 12 19:23:38 2018 +0200 +++ b/Debugger/DebugUI.py Thu Jul 12 19:26:03 2018 +0200 @@ -1198,6 +1198,7 @@ exceptionType, Utilities.html_encode(exceptionMessage))) if res == E5MessageBox.Yes: + self.debugServer.setDebugging(True) self.exceptionInterrupt.emit() stack = [] for fn, ln, func, args in stackTrace:
--- a/Debugger/DebugViewer.py Thu Jul 12 19:23:38 2018 +0200 +++ b/Debugger/DebugViewer.py Thu Jul 12 19:26:03 2018 +0200 @@ -393,7 +393,8 @@ @param frmnr frame number (0 is the current frame) (int) """ self.framenr = frmnr - self.debugServer.remoteClientVariables(0, self.localsFilter, frmnr) + if self.debugServer.isDebugging(): + self.debugServer.remoteClientVariables(0, self.localsFilter, frmnr) if self.__autoViewSource: self.__showSource() @@ -402,19 +403,21 @@ """ Public slot to set the global variable filter. """ - filterStr = self.globalsFilterEdit.text() - self.debugServer.remoteClientSetFilter(1, filterStr) - self.debugServer.remoteClientVariables(2, self.globalsFilter) + if self.debugServer.isDebugging(): + filterStr = self.globalsFilterEdit.text() + self.debugServer.remoteClientSetFilter(1, filterStr) + self.debugServer.remoteClientVariables(2, self.globalsFilter) def setLocalsFilter(self): """ Public slot to set the local variable filter. """ - filterStr = self.localsFilterEdit.text() - self.debugServer.remoteClientSetFilter(0, filterStr) - if self.currentStack: - self.debugServer.remoteClientVariables( - 0, self.localsFilter, self.framenr) + if self.debugServer.isDebugging(): + filterStr = self.localsFilterEdit.text() + self.debugServer.remoteClientSetFilter(0, filterStr) + if self.currentStack: + self.debugServer.remoteClientVariables( + 0, self.localsFilter, self.framenr) def handleDebuggingStarted(self): """
--- a/Documentation/Help/source.qhp Thu Jul 12 19:23:38 2018 +0200 +++ b/Documentation/Help/source.qhp Thu Jul 12 19:26:03 2018 +0200 @@ -3675,6 +3675,7 @@ <keyword name="DebugServer.getWatchPointModel" id="DebugServer.getWatchPointModel" ref="eric6.Debugger.DebugServer.html#DebugServer.getWatchPointModel" /> <keyword name="DebugServer.isClientProcessUp" id="DebugServer.isClientProcessUp" ref="eric6.Debugger.DebugServer.html#DebugServer.isClientProcessUp" /> <keyword name="DebugServer.isConnected" id="DebugServer.isConnected" ref="eric6.Debugger.DebugServer.html#DebugServer.isConnected" /> + <keyword name="DebugServer.isDebugging" id="DebugServer.isDebugging" ref="eric6.Debugger.DebugServer.html#DebugServer.isDebugging" /> <keyword name="DebugServer.passiveStartUp" id="DebugServer.passiveStartUp" ref="eric6.Debugger.DebugServer.html#DebugServer.passiveStartUp" /> <keyword name="DebugServer.preferencesChanged" id="DebugServer.preferencesChanged" ref="eric6.Debugger.DebugServer.html#DebugServer.preferencesChanged" /> <keyword name="DebugServer.registerDebuggerInterface" id="DebugServer.registerDebuggerInterface" ref="eric6.Debugger.DebugServer.html#DebugServer.registerDebuggerInterface" /> @@ -3704,6 +3705,7 @@ <keyword name="DebugServer.remoteUTRun" id="DebugServer.remoteUTRun" ref="eric6.Debugger.DebugServer.html#DebugServer.remoteUTRun" /> <keyword name="DebugServer.remoteUTStop" id="DebugServer.remoteUTStop" ref="eric6.Debugger.DebugServer.html#DebugServer.remoteUTStop" /> <keyword name="DebugServer.setCallTraceEnabled" id="DebugServer.setCallTraceEnabled" ref="eric6.Debugger.DebugServer.html#DebugServer.setCallTraceEnabled" /> + <keyword name="DebugServer.setDebugging" id="DebugServer.setDebugging" ref="eric6.Debugger.DebugServer.html#DebugServer.setDebugging" /> <keyword name="DebugServer.shutdownServer" id="DebugServer.shutdownServer" ref="eric6.Debugger.DebugServer.html#DebugServer.shutdownServer" /> <keyword name="DebugServer.signalClientBanner" id="DebugServer.signalClientBanner" ref="eric6.Debugger.DebugServer.html#DebugServer.signalClientBanner" /> <keyword name="DebugServer.signalClientBreakConditionError" id="DebugServer.signalClientBreakConditionError" ref="eric6.Debugger.DebugServer.html#DebugServer.signalClientBreakConditionError" />
--- a/Documentation/Source/eric6.Debugger.DebugServer.html Thu Jul 12 19:23:38 2018 +0200 +++ b/Documentation/Source/eric6.Debugger.DebugServer.html Thu Jul 12 19:26:03 2018 +0200 @@ -352,6 +352,9 @@ <td><a href="#DebugServer.isConnected">isConnected</a></td> <td>Public method to test, if the debug server is connected to a backend.</td> </tr><tr> +<td><a href="#DebugServer.isDebugging">isDebugging</a></td> +<td>Public method to test, if the debug server is debugging.</td> +</tr><tr> <td><a href="#DebugServer.passiveStartUp">passiveStartUp</a></td> <td>Public method to handle a passive debug connection.</td> </tr><tr> @@ -439,6 +442,9 @@ <td><a href="#DebugServer.setCallTraceEnabled">setCallTraceEnabled</a></td> <td>Public method to set the call trace state.</td> </tr><tr> +<td><a href="#DebugServer.setDebugging">setDebugging</a></td> +<td>Public method to set the debugging state.</td> +</tr><tr> <td><a href="#DebugServer.shutdownServer">shutdownServer</a></td> <td>Public method to cleanly shut down.</td> </tr><tr> @@ -1122,6 +1128,21 @@ <dd> flag indicating a connection (boolean) </dd> +</dl><a NAME="DebugServer.isDebugging" ID="DebugServer.isDebugging"></a> +<h4>DebugServer.isDebugging</h4> +<b>isDebugging</b>(<i></i>) +<p> + Public method to test, if the debug server is debugging. +</p><dl> +<dt>Returns:</dt> +<dd> +flag indicating the debugging state +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> </dl><a NAME="DebugServer.passiveStartUp" ID="DebugServer.passiveStartUp"></a> <h4>DebugServer.passiveStartUp</h4> <b>passiveStartUp</b>(<i>fn, exc</i>) @@ -1570,6 +1591,16 @@ <dd> flag indicating to enable the call trace function (boolean) </dd> +</dl><a NAME="DebugServer.setDebugging" ID="DebugServer.setDebugging"></a> +<h4>DebugServer.setDebugging</h4> +<b>setDebugging</b>(<i>on</i>) +<p> + Public method to set the debugging state. +</p><dl> +<dt><i>on</i> (bool)</dt> +<dd> +flag indicating the new debugging state +</dd> </dl><a NAME="DebugServer.shutdownServer" ID="DebugServer.shutdownServer"></a> <h4>DebugServer.shutdownServer</h4> <b>shutdownServer</b>(<i></i>)