--- a/eric6/Documentation/Source/eric6.Debugger.DebugViewer.html Thu Dec 17 14:30:46 2020 +0100 +++ b/eric6/Documentation/Source/eric6.Debugger.DebugViewer.html Thu Dec 17 14:40:06 2020 +0100 @@ -28,15 +28,15 @@ <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</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 threads for the selected debug client</li> </ul> </p> <h3>Global Attributes</h3> @@ -89,7 +89,7 @@ <h3>Class Attributes</h3> <table> -<tr><td>None</td></tr> +<tr><td>ThreadIdRole</td></tr> </table> <h3>Class Methods</h3> @@ -109,10 +109,46 @@ <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.__showSource">__showSource</a></td> <td>Private slot to handle the source button press to show the selected file.</td> </tr> @@ -129,6 +165,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 +186,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> @@ -208,13 +252,13 @@ </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></dt> +<dt><i>parent</i> (QWidget)</dt> <dd> -parent widget (QWidget) +parent widget </dd> </dl> <a NAME="DebugViewer.__callStackFrameSelected" ID="DebugViewer.__callStackFrameSelected"></a> @@ -227,9 +271,150 @@ </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</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> +</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</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> +</dl> +<a NAME="DebugViewer.__clientSyntaxError" ID="DebugViewer.__clientSyntaxError"></a> +<h4>DebugViewer.__clientSyntaxError</h4> +<b>__clientSyntaxError</b>(<i>message, filename, lineNo, characterNo, debuggerId</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> +</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 +426,60 @@ </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> -frame number (0 is the current frame) (int) +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> +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, iconName, 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>iconName</i> (str)</dt> +<dd> +name of the icon to be used +</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> @@ -263,14 +499,13 @@ </p> <dl> -<dt><i>current</i></dt> +<dt><i>current</i> (QTreeWidgetItem)</dt> <dd> -reference to the new current item (QTreeWidgetItem) +reference to the new current item </dd> -<dt><i>previous</i></dt> +<dt><i>previous</i> (QTreeWidgetItem)</dt> <dd> reference to the previous current item - (QTreeWidgetItem) </dd> </dl> <a NAME="DebugViewer.clearCallTrace" ID="DebugViewer.clearCallTrace"></a> @@ -290,23 +525,71 @@ <dl> <dt>Returns:</dt> <dd> -reference to the current widget (QWidget) +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>Returns:</dt> +<dd> +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>Returns:</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> @@ -330,7 +613,7 @@ <b>handleResetUI</b>(<i></i>) <p> - Public method to reset the SBVviewer. + Public method to reset the viewer. </p> <a NAME="DebugViewer.initCallStackViewer" ID="DebugViewer.initCallStackViewer"></a> <h4>DebugViewer.initCallStackViewer</h4> @@ -341,9 +624,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> @@ -356,7 +639,13 @@ <dl> <dt>Returns:</dt> <dd> -flag indicating the state of the call trace function (boolean) +flag indicating the state of the call trace function +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool </dd> </dl> <a NAME="DebugViewer.setCallTraceToProjectMode" ID="DebugViewer.setCallTraceToProjectMode"></a> @@ -372,9 +661,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 +675,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 +689,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,33 +717,36 @@ </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) +filter list for local variable types </dd> </dl> <a NAME="DebugViewer.showThreadList" ID="DebugViewer.showThreadList"></a> <h4>DebugViewer.showThreadList</h4> -<b>showThreadList</b>(<i>currentID, threadList</i>) +<b>showThreadList</b>(<i>currentID, threadList, debuggerId</i>) <p> Public method to show the thread list. </p> <dl> -<dt><i>currentID</i></dt> +<dt><i>currentID</i> (int)</dt> <dd> -id of the current thread (integer) +id of the current thread </dd> -<dt><i>threadList</i></dt> +<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.showVariable" ID="DebugViewer.showVariable"></a> <h4>DebugViewer.showVariable</h4> @@ -465,11 +757,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 +775,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 +793,7 @@ </p> <dl> -<dt><i>showGlobals</i></dt> +<dt><i>showGlobals</i> (bool)</dt> <dd> flag indicating global/local state </dd>