--- a/eric6/Documentation/Source/eric6.Debugger.DebugViewer.html Sun Jan 17 13:53:08 2021 +0100 +++ b/eric6/Documentation/Source/eric6.Debugger.DebugViewer.html Mon Feb 01 10:38:16 2021 +0100 @@ -28,15 +28,16 @@ <p> The views avaliable are: <ul> - <li>variables viewer for global variables</li> - <li>variables viewer for local variables</li> + <li>selector showing all connected debugger backends with associated + threads</li> + <li>variables viewer for global variables for the selected debug client</li> + <li>variables viewer for local variables for the selected debug client</li> + <li>call stack viewer for the selected debug client</li> <li>call trace viewer</li> <li>viewer for breakpoints</li> <li>viewer for watch expressions</li> <li>viewer for exceptions</li> - <li>viewer for threads</li> - <li>a file browser (optional)</li> - <li>an interpreter shell (optional)</li> + <li>viewer for a code disassembly for an exception<li> </ul> </p> <h3>Global Attributes</h3> @@ -89,7 +90,7 @@ <h3>Class Attributes</h3> <table> -<tr><td>None</td></tr> +<tr><td>DebuggerStateRole</td></tr><tr><td>StateIcon</td></tr><tr><td>StateMessage</td></tr><tr><td>ThreadIdRole</td></tr> </table> <h3>Class Methods</h3> @@ -105,22 +106,62 @@ <td>Constructor</td> </tr> <tr> +<td><a href="#DebugViewer.__addThreadList">__addThreadList</a></td> +<td>Private method to add the list of threads to a debugger entry.</td> +</tr> +<tr> <td><a href="#DebugViewer.__callStackFrameSelected">__callStackFrameSelected</a></td> <td>Private slot to handle the selection of a call stack entry of the call stack viewer.</td> </tr> <tr> +<td><a href="#DebugViewer.__clientDebuggerId">__clientDebuggerId</a></td> +<td>Private slot to receive the ID of a newly connected debugger backend.</td> +</tr> +<tr> +<td><a href="#DebugViewer.__clientException">__clientException</a></td> +<td>Private method to handle an exception of the debugged program.</td> +</tr> +<tr> +<td><a href="#DebugViewer.__clientExit">__clientExit</a></td> +<td>Private method to handle the debugged program terminating.</td> +</tr> +<tr> +<td><a href="#DebugViewer.__clientLine">__clientLine</a></td> +<td>Private method to handle a change to the current line.</td> +</tr> +<tr> +<td><a href="#DebugViewer.__clientSyntaxError">__clientSyntaxError</a></td> +<td>Private method to handle a syntax error in the debugged program.</td> +</tr> +<tr> +<td><a href="#DebugViewer.__debuggerSelected">__debuggerSelected</a></td> +<td>Private slot to handle the selection of a debugger backend in the debuggers list.</td> +</tr> +<tr> <td><a href="#DebugViewer.__frameSelected">__frameSelected</a></td> <td>Private slot to handle the selection of a new stack frame number.</td> </tr> <tr> +<td><a href="#DebugViewer.__removeDebugger">__removeDebugger</a></td> +<td>Private method to remove a debugger given its ID.</td> +</tr> +<tr> +<td><a href="#DebugViewer.__setCurrentDebugger">__setCurrentDebugger</a></td> +<td>Private method to set the current debugger based on the given ID.</td> +</tr> +<tr> +<td><a href="#DebugViewer.__setDebuggerIconAndState">__setDebuggerIconAndState</a></td> +<td>Private method to set the icon for a specific debugger ID.</td> +</tr> +<tr> +<td><a href="#DebugViewer.__setThreadIconAndState">__setThreadIconAndState</a></td> +<td>Private method to set the icon for a specific thread name and debugger ID.</td> +</tr> +<tr> <td><a href="#DebugViewer.__showSource">__showSource</a></td> <td>Private slot to handle the source button press to show the selected file.</td> </tr> <tr> -<td><a href="#DebugViewer.__threadSelected">__threadSelected</a></td> -<td>Private slot to handle the selection of a thread in the thread list.</td> -</tr> -<tr> <td><a href="#DebugViewer.clearCallTrace">clearCallTrace</a></td> <td>Public method to clear the recorded call trace.</td> </tr> @@ -129,6 +170,14 @@ <td>Public method to get a reference to the current widget.</td> </tr> <tr> +<td><a href="#DebugViewer.getSelectedDebuggerId">getSelectedDebuggerId</a></td> +<td>Public method to get the currently selected debugger ID.</td> +</tr> +<tr> +<td><a href="#DebugViewer.getSelectedDebuggerState">getSelectedDebuggerState</a></td> +<td>Public method to get the currently selected debugger's state.</td> +</tr> +<tr> <td><a href="#DebugViewer.handleClientStack">handleClientStack</a></td> <td>Public slot to show the call stack of the program being debugged.</td> </tr> @@ -142,7 +191,7 @@ </tr> <tr> <td><a href="#DebugViewer.handleResetUI">handleResetUI</a></td> -<td>Public method to reset the SBVviewer.</td> +<td>Public method to reset the viewer.</td> </tr> <tr> <td><a href="#DebugViewer.initCallStackViewer">initCallStackViewer</a></td> @@ -153,6 +202,10 @@ <td>Public method to get the state of the call trace function.</td> </tr> <tr> +<td><a href="#DebugViewer.isOnlyDebugger">isOnlyDebugger</a></td> +<td>Public method to test, if only one debugger is connected.</td> +</tr> +<tr> <td><a href="#DebugViewer.setCallTraceToProjectMode">setCallTraceToProjectMode</a></td> <td>Public slot to set the call trace viewer to project mode.</td> </tr> @@ -177,10 +230,6 @@ <td>Public slot to set the local variables filter.</td> </tr> <tr> -<td><a href="#DebugViewer.showThreadList">showThreadList</a></td> -<td>Public method to show the thread list.</td> -</tr> -<tr> <td><a href="#DebugViewer.showVariable">showVariable</a></td> <td>Public method to show the variables in the respective window.</td> </tr> @@ -208,13 +257,35 @@ </p> <dl> -<dt><i>debugServer</i></dt> +<dt><i>debugServer</i> (DebugServer)</dt> <dd> -reference to the debug server object (DebugServer) +reference to the debug server object +</dd> +<dt><i>parent</i> (QWidget)</dt> +<dd> +parent widget </dd> -<dt><i>parent</i></dt> +</dl> +<a NAME="DebugViewer.__addThreadList" ID="DebugViewer.__addThreadList"></a> +<h4>DebugViewer.__addThreadList</h4> +<b>__addThreadList</b>(<i>currentID, threadList, debuggerId</i>) + +<p> + Private method to add the list of threads to a debugger entry. +</p> +<dl> + +<dt><i>currentID</i> (int)</dt> <dd> -parent widget (QWidget) +id of the current thread +</dd> +<dt><i>threadList</i> (list of dict)</dt> +<dd> +list of dictionaries containing the thread data +</dd> +<dt><i>debuggerId</i> (str)</dt> +<dd> +ID of the debugger backend </dd> </dl> <a NAME="DebugViewer.__callStackFrameSelected" ID="DebugViewer.__callStackFrameSelected"></a> @@ -227,9 +298,162 @@ </p> <dl> -<dt><i>frameNo</i></dt> +<dt><i>frameNo</i> (int)</dt> +<dd> +frame number (index) of the selected entry +</dd> +</dl> +<a NAME="DebugViewer.__clientDebuggerId" ID="DebugViewer.__clientDebuggerId"></a> +<h4>DebugViewer.__clientDebuggerId</h4> +<b>__clientDebuggerId</b>(<i>debuggerId</i>) + +<p> + Private slot to receive the ID of a newly connected debugger backend. +</p> +<dl> + +<dt><i>debuggerId</i> (str)</dt> +<dd> +ID of a newly connected debugger backend +</dd> +</dl> +<a NAME="DebugViewer.__clientException" ID="DebugViewer.__clientException"></a> +<h4>DebugViewer.__clientException</h4> +<b>__clientException</b>(<i>exceptionType, exceptionMessage, stackTrace, debuggerId, threadName</i>) + +<p> + Private method to handle an exception of the debugged program. +</p> +<dl> + +<dt><i>exceptionType</i> (str)</dt> +<dd> +type of exception raised +</dd> +<dt><i>exceptionMessage</i> ((str)</dt> +<dd> +message given by the exception +</dd> +<dt><i>stackTrace</i> (list of str)</dt> +<dd> +list of stack entries +</dd> +<dt><i>debuggerId</i> (str)</dt> +<dd> +ID of the debugger backend +</dd> +<dt><i>threadName</i> (str)</dt> +<dd> +name of the thread signaling the event +</dd> +</dl> +<a NAME="DebugViewer.__clientExit" ID="DebugViewer.__clientExit"></a> +<h4>DebugViewer.__clientExit</h4> +<b>__clientExit</b>(<i>program, status, message, quiet, debuggerId</i>) + +<p> + Private method to handle the debugged program terminating. +</p> +<dl> + +<dt><i>program</i> (str)</dt> +<dd> +name of the exited program +</dd> +<dt><i>status</i> (int)</dt> +<dd> +exit code of the debugged program +</dd> +<dt><i>message</i> (str)</dt> +<dd> +exit message of the debugged program +</dd> +<dt><i>quiet</i> (bool)</dt> +<dd> +flag indicating to suppress exit info display +</dd> +<dt><i>debuggerId</i> (str)</dt> <dd> -frame number (index) of the selected entry (integer) +ID of the debugger backend +</dd> +</dl> +<a NAME="DebugViewer.__clientLine" ID="DebugViewer.__clientLine"></a> +<h4>DebugViewer.__clientLine</h4> +<b>__clientLine</b>(<i>fn, line, debuggerId, threadName</i>) + +<p> + Private method to handle a change to the current line. +</p> +<dl> + +<dt><i>fn</i> (str)</dt> +<dd> +filename +</dd> +<dt><i>line</i> (int)</dt> +<dd> +linenumber +</dd> +<dt><i>debuggerId</i> (str)</dt> +<dd> +ID of the debugger backend +</dd> +<dt><i>threadName</i> (str)</dt> +<dd> +name of the thread signaling the event +</dd> +</dl> +<a NAME="DebugViewer.__clientSyntaxError" ID="DebugViewer.__clientSyntaxError"></a> +<h4>DebugViewer.__clientSyntaxError</h4> +<b>__clientSyntaxError</b>(<i>message, filename, lineNo, characterNo, debuggerId, threadName</i>) + +<p> + Private method to handle a syntax error in the debugged program. +</p> +<dl> + +<dt><i>message</i> (str)</dt> +<dd> +message of the syntax error +</dd> +<dt><i>filename</i> (str)</dt> +<dd> +translated filename of the syntax error position +</dd> +<dt><i>lineNo</i> (int)</dt> +<dd> +line number of the syntax error position +</dd> +<dt><i>characterNo</i> (int)</dt> +<dd> +character number of the syntax error position +</dd> +<dt><i>debuggerId</i> (str)</dt> +<dd> +ID of the debugger backend +</dd> +<dt><i>threadName</i> (str)</dt> +<dd> +name of the thread signaling the event +</dd> +</dl> +<a NAME="DebugViewer.__debuggerSelected" ID="DebugViewer.__debuggerSelected"></a> +<h4>DebugViewer.__debuggerSelected</h4> +<b>__debuggerSelected</b>(<i>current, previous</i>) + +<p> + Private slot to handle the selection of a debugger backend in the + debuggers list. +</p> +<dl> + +<dt><i>current</i> (QTreeWidgetItem)</dt> +<dd> +reference to the new current item +</dd> +<dt><i>previous</i> (QTreeWidgetItem)</dt> +<dd> +reference to the previous current item </dd> </dl> <a NAME="DebugViewer.__frameSelected" ID="DebugViewer.__frameSelected"></a> @@ -241,9 +465,80 @@ </p> <dl> -<dt><i>frmnr</i></dt> +<dt><i>frmnr</i> (int)</dt> +<dd> +frame number (0 is the current frame) +</dd> +</dl> +<a NAME="DebugViewer.__removeDebugger" ID="DebugViewer.__removeDebugger"></a> +<h4>DebugViewer.__removeDebugger</h4> +<b>__removeDebugger</b>(<i>debuggerId</i>) + +<p> + Private method to remove a debugger given its ID. +</p> +<dl> + +<dt><i>debuggerId</i> (str)</dt> +<dd> +ID of the debugger to be removed from the list +</dd> +</dl> +<a NAME="DebugViewer.__setCurrentDebugger" ID="DebugViewer.__setCurrentDebugger"></a> +<h4>DebugViewer.__setCurrentDebugger</h4> +<b>__setCurrentDebugger</b>(<i>debuggerId</i>) + +<p> + Private method to set the current debugger based on the given ID. +</p> +<dl> + +<dt><i>debuggerId</i> (str)</dt> <dd> -frame number (0 is the current frame) (int) +ID of the debugger to set as current debugger +</dd> +</dl> +<a NAME="DebugViewer.__setDebuggerIconAndState" ID="DebugViewer.__setDebuggerIconAndState"></a> +<h4>DebugViewer.__setDebuggerIconAndState</h4> +<b>__setDebuggerIconAndState</b>(<i>debuggerId, state</i>) + +<p> + Private method to set the icon for a specific debugger ID. +</p> +<dl> + +<dt><i>debuggerId</i> (str)</dt> +<dd> +ID of the debugger backend (empty ID means the + currently selected one) +</dd> +<dt><i>state</i> (str)</dt> +<dd> +state of the debugger (broken, exception, running) +</dd> +</dl> +<a NAME="DebugViewer.__setThreadIconAndState" ID="DebugViewer.__setThreadIconAndState"></a> +<h4>DebugViewer.__setThreadIconAndState</h4> +<b>__setThreadIconAndState</b>(<i>debuggerId, threadName, state</i>) + +<p> + Private method to set the icon for a specific thread name and + debugger ID. +</p> +<dl> + +<dt><i>debuggerId</i> (str)</dt> +<dd> +ID of the debugger backend (empty ID means the + currently selected one) +</dd> +<dt><i>threadName</i> (str)</dt> +<dd> +name of the thread signaling the event +</dd> +<dt><i>state</i> (str)</dt> +<dd> +state of the debugger (broken, exception, running) </dd> </dl> <a NAME="DebugViewer.__showSource" ID="DebugViewer.__showSource"></a> @@ -254,25 +549,6 @@ Private slot to handle the source button press to show the selected file. </p> -<a NAME="DebugViewer.__threadSelected" ID="DebugViewer.__threadSelected"></a> -<h4>DebugViewer.__threadSelected</h4> -<b>__threadSelected</b>(<i>current, previous</i>) - -<p> - Private slot to handle the selection of a thread in the thread list. -</p> -<dl> - -<dt><i>current</i></dt> -<dd> -reference to the new current item (QTreeWidgetItem) -</dd> -<dt><i>previous</i></dt> -<dd> -reference to the previous current item - (QTreeWidgetItem) -</dd> -</dl> <a NAME="DebugViewer.clearCallTrace" ID="DebugViewer.clearCallTrace"></a> <h4>DebugViewer.clearCallTrace</h4> <b>clearCallTrace</b>(<i></i>) @@ -288,25 +564,73 @@ Public method to get a reference to the current widget. </p> <dl> -<dt>Returns:</dt> +<dt>Return:</dt> +<dd> +reference to the current widget +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +QWidget +</dd> +</dl> +<a NAME="DebugViewer.getSelectedDebuggerId" ID="DebugViewer.getSelectedDebuggerId"></a> +<h4>DebugViewer.getSelectedDebuggerId</h4> +<b>getSelectedDebuggerId</b>(<i></i>) + +<p> + Public method to get the currently selected debugger ID. +</p> +<dl> +<dt>Return:</dt> <dd> -reference to the current widget (QWidget) +selected debugger ID +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +str +</dd> +</dl> +<a NAME="DebugViewer.getSelectedDebuggerState" ID="DebugViewer.getSelectedDebuggerState"></a> +<h4>DebugViewer.getSelectedDebuggerState</h4> +<b>getSelectedDebuggerState</b>(<i></i>) + +<p> + Public method to get the currently selected debugger's state. +</p> +<dl> +<dt>Return:</dt> +<dd> +selected debugger's state (broken, exception, running) +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +str </dd> </dl> <a NAME="DebugViewer.handleClientStack" ID="DebugViewer.handleClientStack"></a> <h4>DebugViewer.handleClientStack</h4> -<b>handleClientStack</b>(<i>stack</i>) +<b>handleClientStack</b>(<i>stack, debuggerId</i>) <p> Public slot to show the call stack of the program being debugged. </p> <dl> -<dt><i>stack</i></dt> +<dt><i>stack</i> (list of tuples of (str, str, str, str))</dt> <dd> list of tuples with call stack data (file name, line number, function name, formatted argument/values list) </dd> +<dt><i>debuggerId</i> (str)</dt> +<dd> +ID of the debugger backend +</dd> </dl> <a NAME="DebugViewer.handleDebuggingStarted" ID="DebugViewer.handleDebuggingStarted"></a> <h4>DebugViewer.handleDebuggingStarted</h4> @@ -327,11 +651,18 @@ </p> <a NAME="DebugViewer.handleResetUI" ID="DebugViewer.handleResetUI"></a> <h4>DebugViewer.handleResetUI</h4> -<b>handleResetUI</b>(<i></i>) +<b>handleResetUI</b>(<i>fullReset</i>) <p> - Public method to reset the SBVviewer. + Public method to reset the viewer. </p> +<dl> + +<dt><i>fullReset</i> (bool)</dt> +<dd> +flag indicating a full reset is required +</dd> +</dl> <a NAME="DebugViewer.initCallStackViewer" ID="DebugViewer.initCallStackViewer"></a> <h4>DebugViewer.initCallStackViewer</h4> <b>initCallStackViewer</b>(<i>projectMode</i>) @@ -341,9 +672,9 @@ </p> <dl> -<dt><i>projectMode</i></dt> +<dt><i>projectMode</i> (bool)</dt> <dd> -flag indicating to enable the project mode (boolean) +flag indicating to enable the project mode </dd> </dl> <a NAME="DebugViewer.isCallTraceEnabled" ID="DebugViewer.isCallTraceEnabled"></a> @@ -354,9 +685,34 @@ Public method to get the state of the call trace function. </p> <dl> -<dt>Returns:</dt> +<dt>Return:</dt> +<dd> +flag indicating the state of the call trace function +</dd> +</dl> +<dl> +<dt>Return Type:</dt> <dd> -flag indicating the state of the call trace function (boolean) +bool +</dd> +</dl> +<a NAME="DebugViewer.isOnlyDebugger" ID="DebugViewer.isOnlyDebugger"></a> +<h4>DebugViewer.isOnlyDebugger</h4> +<b>isOnlyDebugger</b>(<i></i>) + +<p> + Public method to test, if only one debugger is connected. +</p> +<dl> +<dt>Return:</dt> +<dd> +flag indicating that only one debugger is connected +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool </dd> </dl> <a NAME="DebugViewer.setCallTraceToProjectMode" ID="DebugViewer.setCallTraceToProjectMode"></a> @@ -372,9 +728,9 @@ </p> <dl> -<dt><i>enabled</i></dt> +<dt><i>enabled</i> (bool)</dt> <dd> -flag indicating to enable the project mode (boolean) +flag indicating to enable the project mode </dd> </dl> <a NAME="DebugViewer.setCurrentWidget" ID="DebugViewer.setCurrentWidget"></a> @@ -386,9 +742,9 @@ </p> <dl> -<dt><i>widget</i></dt> +<dt><i>widget</i> (QWidget)</dt> <dd> -reference to the widget (QWidget) +reference to the widget </dd> </dl> <a NAME="DebugViewer.setDebugger" ID="DebugViewer.setDebugger"></a> @@ -400,9 +756,9 @@ </p> <dl> -<dt><i>debugUI</i></dt> +<dt><i>debugUI</i> (DebugUI)</dt> <dd> -reference to the DebugUI object (DebugUI) +reference to the DebugUI object </dd> </dl> <a NAME="DebugViewer.setGlobalsFilter" ID="DebugViewer.setGlobalsFilter"></a> @@ -428,32 +784,13 @@ </p> <dl> -<dt><i>globalsFilter</i></dt> +<dt><i>globalsFilter</i> (list of str)</dt> <dd> filter list for global variable types - (list of int) </dd> -<dt><i>localsFilter</i></dt> +<dt><i>localsFilter</i> (list of str)</dt> <dd> -filter list for local variable types (list of int) -</dd> -</dl> -<a NAME="DebugViewer.showThreadList" ID="DebugViewer.showThreadList"></a> -<h4>DebugViewer.showThreadList</h4> -<b>showThreadList</b>(<i>currentID, threadList</i>) - -<p> - Public method to show the thread list. -</p> -<dl> - -<dt><i>currentID</i></dt> -<dd> -id of the current thread (integer) -</dd> -<dt><i>threadList</i></dt> -<dd> -list of dictionaries containing the thread data +filter list for local variable types </dd> </dl> <a NAME="DebugViewer.showVariable" ID="DebugViewer.showVariable"></a> @@ -465,11 +802,11 @@ </p> <dl> -<dt><i>vlist</i></dt> +<dt><i>vlist</i> (list)</dt> <dd> list of variables to display </dd> -<dt><i>showGlobals</i></dt> +<dt><i>showGlobals</i> (bool)</dt> <dd> flag indicating global/local state </dd> @@ -483,11 +820,11 @@ </p> <dl> -<dt><i>vlist</i></dt> +<dt><i>vlist</i> (list)</dt> <dd> list of variables to display </dd> -<dt><i>showGlobals</i></dt> +<dt><i>showGlobals</i> (bool)</dt> <dd> flag indicating global/local state </dd> @@ -501,7 +838,7 @@ </p> <dl> -<dt><i>showGlobals</i></dt> +<dt><i>showGlobals</i> (bool)</dt> <dd> flag indicating global/local state </dd>