eric6/Documentation/Source/eric6.DebugClients.Python.DebugClientBase.html

changeset 7887
c1588f5a83e9
parent 7707
6abcf4275d0e
child 7898
1bcd6d4df182
equal deleted inserted replaced
7885:3e4605cc3541 7887:c1588f5a83e9
46 <tr> 46 <tr>
47 <td><a href="#DebugClientClose">DebugClientClose</a></td> 47 <td><a href="#DebugClientClose">DebugClientClose</a></td>
48 <td>Replacement for the standard os.close(fd).</td> 48 <td>Replacement for the standard os.close(fd).</td>
49 </tr> 49 </tr>
50 <tr> 50 <tr>
51 <td><a href="#DebugClientFork">DebugClientFork</a></td>
52 <td>Replacement for the standard os.fork().</td>
53 </tr>
54 <tr>
55 <td><a href="#DebugClientInput">DebugClientInput</a></td> 51 <td><a href="#DebugClientInput">DebugClientInput</a></td>
56 <td>Replacement for the standard input() builtin.</td> 52 <td>Replacement for the standard input() builtin.</td>
57 </tr> 53 </tr>
58 <tr> 54 <tr>
59 <td><a href="#DebugClientSetRecursionLimit">DebugClientSetRecursionLimit</a></td> 55 <td><a href="#DebugClientSetRecursionLimit">DebugClientSetRecursionLimit</a></td>
113 <tr> 109 <tr>
114 <td><a href="#DebugClientBase.__clientCapabilities">__clientCapabilities</a></td> 110 <td><a href="#DebugClientBase.__clientCapabilities">__clientCapabilities</a></td>
115 <td>Private method to determine the clients capabilities.</td> 111 <td>Private method to determine the clients capabilities.</td>
116 </tr> 112 </tr>
117 <tr> 113 <tr>
114 <td><a href="#DebugClientBase.__compileCommand">__compileCommand</a></td>
115 <td>Private method to compile source code.</td>
116 </tr>
117 <tr>
118 <td><a href="#DebugClientBase.__compileFileSource">__compileFileSource</a></td> 118 <td><a href="#DebugClientBase.__compileFileSource">__compileFileSource</a></td>
119 <td>Private method to compile source code read from a file.</td> 119 <td>Private method to compile source code read from a file.</td>
120 </tr> 120 </tr>
121 <tr> 121 <tr>
122 <td><a href="#DebugClientBase.__completionList">__completionList</a></td> 122 <td><a href="#DebugClientBase.__completionList">__completionList</a></td>
197 <tr> 197 <tr>
198 <td><a href="#DebugClientBase.eventPoll">eventPoll</a></td> 198 <td><a href="#DebugClientBase.eventPoll">eventPoll</a></td>
199 <td>Public method to poll for events like 'set break point'.</td> 199 <td>Public method to poll for events like 'set break point'.</td>
200 </tr> 200 </tr>
201 <tr> 201 <tr>
202 <td><a href="#DebugClientBase.fork">fork</a></td>
203 <td>Public method implementing a fork routine deciding which branch to follow.</td>
204 </tr>
205 <tr>
206 <td><a href="#DebugClientBase.getCoding">getCoding</a></td> 202 <td><a href="#DebugClientBase.getCoding">getCoding</a></td>
207 <td>Public method to return the current coding.</td> 203 <td>Public method to return the current coding.</td>
208 </tr> 204 </tr>
209 <tr> 205 <tr>
210 <td><a href="#DebugClientBase.getRunning">getRunning</a></td> 206 <td><a href="#DebugClientBase.getRunning">getRunning</a></td>
243 <td>Public method to signal the deletion of a temporary breakpoint.</td> 239 <td>Public method to signal the deletion of a temporary breakpoint.</td>
244 </tr> 240 </tr>
245 <tr> 241 <tr>
246 <td><a href="#DebugClientBase.sendClearTemporaryWatch">sendClearTemporaryWatch</a></td> 242 <td><a href="#DebugClientBase.sendClearTemporaryWatch">sendClearTemporaryWatch</a></td>
247 <td>Public method to signal the deletion of a temporary watch expression.</td> 243 <td>Public method to signal the deletion of a temporary watch expression.</td>
244 </tr>
245 <tr>
246 <td><a href="#DebugClientBase.sendDebuggerId">sendDebuggerId</a></td>
247 <td>Public method to send the debug client id.</td>
248 </tr> 248 </tr>
249 <tr> 249 <tr>
250 <td><a href="#DebugClientBase.sendException">sendException</a></td> 250 <td><a href="#DebugClientBase.sendException">sendException</a></td>
251 <td>Public method to send information for an exception.</td> 251 <td>Public method to send information for an exception.</td>
252 </tr> 252 </tr>
343 <dt>Returns:</dt> 343 <dt>Returns:</dt>
344 <dd> 344 <dd>
345 client capabilities (integer) 345 client capabilities (integer)
346 </dd> 346 </dd>
347 </dl> 347 </dl>
348 <a NAME="DebugClientBase.__compileCommand" ID="DebugClientBase.__compileCommand"></a>
349 <h4>DebugClientBase.__compileCommand</h4>
350 <b>__compileCommand</b>(<i>statement, filename="<string>", mode="exec"</i>)
351
352 <p>
353 Private method to compile source code.
354 </p>
355 <dl>
356
357 <dt><i>statement</i> (str)</dt>
358 <dd>
359 source code string to be compiled
360 </dd>
361 <dt><i>filename</i> (str)</dt>
362 <dd>
363 name of the source file
364 </dd>
365 <dt><i>mode</i> (str)</dt>
366 <dd>
367 kind of code to be generated (exec or eval)
368 </dd>
369 </dl>
370 <dl>
371 <dt>Returns:</dt>
372 <dd>
373 compiled code object (None in case of errors)
374 </dd>
375 </dl>
348 <a NAME="DebugClientBase.__compileFileSource" ID="DebugClientBase.__compileFileSource"></a> 376 <a NAME="DebugClientBase.__compileFileSource" ID="DebugClientBase.__compileFileSource"></a>
349 <h4>DebugClientBase.__compileFileSource</h4> 377 <h4>DebugClientBase.__compileFileSource</h4>
350 <b>__compileFileSource</b>(<i>filename, mode='exec'</i>) 378 <b>__compileFileSource</b>(<i>filename, mode='exec'</i>)
351 379
352 <p> 380 <p>
353 Private method to compile source code read from a file. 381 Private method to compile source code read from a file.
354 </p> 382 </p>
355 <dl> 383 <dl>
356 384
357 <dt><i>filename</i></dt> 385 <dt><i>filename</i> (str)</dt>
358 <dd> 386 <dd>
359 name of the source file (string) 387 name of the source file
360 </dd> 388 </dd>
361 <dt><i>mode</i></dt> 389 <dt><i>mode</i> (str)</dt>
362 <dd> 390 <dd>
363 kind of code to be generated (string, exec or eval) 391 kind of code to be generated (exec or eval)
364 </dd> 392 </dd>
365 </dl> 393 </dl>
366 <dl> 394 <dl>
367 <dt>Returns:</dt> 395 <dt>Returns:</dt>
368 <dd> 396 <dd>
404 <dd> 432 <dd>
405 1 to report global variables, 0 for local variables 433 1 to report global variables, 0 for local variables
406 </dd> 434 </dd>
407 <dt><i>filterList</i> (list of int)</dt> 435 <dt><i>filterList</i> (list of int)</dt>
408 <dd> 436 <dd>
409 the indices of variable types to be filtered 437 list of variable types to be filtered
410 </dd> 438 </dd>
411 </dl> 439 </dl>
412 <a NAME="DebugClientBase.__dumpVariables" ID="DebugClientBase.__dumpVariables"></a> 440 <a NAME="DebugClientBase.__dumpVariables" ID="DebugClientBase.__dumpVariables"></a>
413 <h4>DebugClientBase.__dumpVariables</h4> 441 <h4>DebugClientBase.__dumpVariables</h4>
414 <b>__dumpVariables</b>(<i>frmnr, scope, filterList</i>) 442 <b>__dumpVariables</b>(<i>frmnr, scope, filterList</i>)
424 </dd> 452 </dd>
425 <dt><i>scope</i> (int)</dt> 453 <dt><i>scope</i> (int)</dt>
426 <dd> 454 <dd>
427 1 to report global variables, 0 for local variables 455 1 to report global variables, 0 for local variables
428 </dd> 456 </dd>
429 <dt><i>filterList</i> (list of int)</dt> 457 <dt><i>filterList</i> (list of str)</dt>
430 <dd> 458 <dd>
431 the indices of variable types to be filtered 459 list of variable types to be filtered
432 </dd> 460 </dd>
433 </dl> 461 </dl>
434 <a NAME="DebugClientBase.__extractIndicators" ID="DebugClientBase.__extractIndicators"></a> 462 <a NAME="DebugClientBase.__extractIndicators" ID="DebugClientBase.__extractIndicators"></a>
435 <h4>DebugClientBase.__extractIndicators</h4> 463 <h4>DebugClientBase.__extractIndicators</h4>
436 <b>__extractIndicators</b>(<i>var</i>) 464 <b>__extractIndicators</b>(<i>var</i>)
509 1 to filter using the globals filter, 0 using the locals 537 1 to filter using the globals filter, 0 using the locals
510 filter. 538 filter.
511 Variables are only added to the list, if their name do not match 539 Variables are only added to the list, if their name do not match
512 any of the filter expressions. 540 any of the filter expressions.
513 </dd> 541 </dd>
514 <dt><i>filterList</i> (list of int)</dt> 542 <dt><i>filterList</i> (list of str)</dt>
515 <dd> 543 <dd>
516 the indices of variable types to be filtered. 544 list of variable types to be filtered.
517 Variables are only added to the list, if their type is not 545 Variables are only added to the list, if their type is not
518 contained in the filter list. 546 contained in the filter list.
519 </dd> 547 </dd>
520 </dl> 548 </dl>
521 <dl> 549 <dl>
724 file descriptor to be closed (integer) 752 file descriptor to be closed (integer)
725 </dd> 753 </dd>
726 </dl> 754 </dl>
727 <a NAME="DebugClientBase.connectDebugger" ID="DebugClientBase.connectDebugger"></a> 755 <a NAME="DebugClientBase.connectDebugger" ID="DebugClientBase.connectDebugger"></a>
728 <h4>DebugClientBase.connectDebugger</h4> 756 <h4>DebugClientBase.connectDebugger</h4>
729 <b>connectDebugger</b>(<i>port, remoteAddress=None, redirect=True</i>) 757 <b>connectDebugger</b>(<i>port, remoteAddress=None, redirect=True, name=""</i>)
730 758
731 <p> 759 <p>
732 Public method to establish a session with the debugger. 760 Public method to establish a session with the debugger.
733 </p> 761 </p>
734 <p> 762 <p>
736 stdout and stderr and saves these file objects in case the application 764 stdout and stderr and saves these file objects in case the application
737 being debugged redirects them itself. 765 being debugged redirects them itself.
738 </p> 766 </p>
739 <dl> 767 <dl>
740 768
741 <dt><i>port</i></dt> 769 <dt><i>port</i> (int)</dt>
742 <dd> 770 <dd>
743 the port number to connect to (int) 771 the port number to connect to
744 </dd> 772 </dd>
745 <dt><i>remoteAddress</i></dt> 773 <dt><i>remoteAddress</i> (str)</dt>
746 <dd> 774 <dd>
747 the network address of the debug server host 775 the network address of the debug server host
748 (string) 776 </dd>
749 </dd> 777 <dt><i>redirect</i> (bool)</dt>
750 <dt><i>redirect</i></dt>
751 <dd> 778 <dd>
752 flag indicating redirection of stdin, stdout and 779 flag indicating redirection of stdin, stdout and
753 stderr (boolean) 780 stderr
781 </dd>
782 <dt><i>name</i> (str)</dt>
783 <dd>
784 name to be attached to the debugger ID
754 </dd> 785 </dd>
755 </dl> 786 </dl>
756 <a NAME="DebugClientBase.eventLoop" ID="DebugClientBase.eventLoop"></a> 787 <a NAME="DebugClientBase.eventLoop" ID="DebugClientBase.eventLoop"></a>
757 <h4>DebugClientBase.eventLoop</h4> 788 <h4>DebugClientBase.eventLoop</h4>
758 <b>eventLoop</b>(<i>disablePolling=False</i>) 789 <b>eventLoop</b>(<i>disablePolling=False</i>)
773 <b>eventPoll</b>(<i></i>) 804 <b>eventPoll</b>(<i></i>)
774 805
775 <p> 806 <p>
776 Public method to poll for events like 'set break point'. 807 Public method to poll for events like 'set break point'.
777 </p> 808 </p>
778 <a NAME="DebugClientBase.fork" ID="DebugClientBase.fork"></a>
779 <h4>DebugClientBase.fork</h4>
780 <b>fork</b>(<i></i>)
781
782 <p>
783 Public method implementing a fork routine deciding which branch
784 to follow.
785 </p>
786 <dl>
787 <dt>Returns:</dt>
788 <dd>
789 process ID (integer)
790 </dd>
791 </dl>
792 <a NAME="DebugClientBase.getCoding" ID="DebugClientBase.getCoding"></a> 809 <a NAME="DebugClientBase.getCoding" ID="DebugClientBase.getCoding"></a>
793 <h4>DebugClientBase.getCoding</h4> 810 <h4>DebugClientBase.getCoding</h4>
794 <b>getCoding</b>(<i></i>) 811 <b>getCoding</b>(<i></i>)
795 812
796 <p> 813 <p>
986 <dt><i>condition</i> (str)</dt> 1003 <dt><i>condition</i> (str)</dt>
987 <dd> 1004 <dd>
988 condition of the watch expression to be cleared 1005 condition of the watch expression to be cleared
989 </dd> 1006 </dd>
990 </dl> 1007 </dl>
1008 <a NAME="DebugClientBase.sendDebuggerId" ID="DebugClientBase.sendDebuggerId"></a>
1009 <h4>DebugClientBase.sendDebuggerId</h4>
1010 <b>sendDebuggerId</b>(<i>debuggerId</i>)
1011
1012 <p>
1013 Public method to send the debug client id.
1014 </p>
1015 <dl>
1016
1017 <dt><i>debuggerId</i> (str)</dt>
1018 <dd>
1019 id of this debug client instance (made up of
1020 hostname and process ID)
1021 </dd>
1022 </dl>
991 <a NAME="DebugClientBase.sendException" ID="DebugClientBase.sendException"></a> 1023 <a NAME="DebugClientBase.sendException" ID="DebugClientBase.sendException"></a>
992 <h4>DebugClientBase.sendException</h4> 1024 <h4>DebugClientBase.sendException</h4>
993 <b>sendException</b>(<i>exceptionType, exceptionMessage, stack</i>) 1025 <b>sendException</b>(<i>exceptionType, exceptionMessage, stack</i>)
994 1026
995 <p> 1027 <p>
1117 dictionary containing the disassembly information 1149 dictionary containing the disassembly information
1118 </dd> 1150 </dd>
1119 </dl> 1151 </dl>
1120 <a NAME="DebugClientBase.startDebugger" ID="DebugClientBase.startDebugger"></a> 1152 <a NAME="DebugClientBase.startDebugger" ID="DebugClientBase.startDebugger"></a>
1121 <h4>DebugClientBase.startDebugger</h4> 1153 <h4>DebugClientBase.startDebugger</h4>
1122 <b>startDebugger</b>(<i>filename=None, host=None, port=None, enableTrace=True, exceptions=True, tracePython=False, redirect=True</i>) 1154 <b>startDebugger</b>(<i>filename=None, host=None, port=None, enableTrace=True, exceptions=True, tracePython=False, redirect=True, passive=True, multiprocessSupport=False</i>)
1123 1155
1124 <p> 1156 <p>
1125 Public method used to start the remote debugger. 1157 Public method used to start the remote debugger.
1126 </p> 1158 </p>
1127 <dl> 1159 <dl>
1128 1160
1129 <dt><i>filename</i></dt> 1161 <dt><i>filename</i> (str)</dt>
1130 <dd> 1162 <dd>
1131 the program to be debugged (string) 1163 the program to be debugged
1164 </dd>
1165 <dt><i>host</i> (str)</dt>
1166 <dd>
1167 hostname of the debug server
1168 </dd>
1169 <dt><i>port</i> (int)</dt>
1170 <dd>
1171 portnumber of the debug server
1172 </dd>
1173 <dt><i>enableTrace</i> (bool)</dt>
1174 <dd>
1175 flag to enable the tracing function
1176 </dd>
1177 <dt><i>exceptions</i> (bool)</dt>
1178 <dd>
1179 flag to enable exception reporting of the IDE
1180 </dd>
1181 <dt><i>tracePython</i> (bool)</dt>
1182 <dd>
1183 flag to enable tracing into the Python library
1184 </dd>
1185 <dt><i>redirect</i> (bool)</dt>
1186 <dd>
1187 flag indicating redirection of stdin, stdout and
1188 stderr
1189 </dd>
1190 <dt><i>passive</i> (bool)</dt>
1191 <dd>
1192 flag indicating a passive debugging session
1193 </dd>
1194 <dt><i>multiprocessSupport</i> (bool)</dt>
1195 <dd>
1196 flag indicating to enable multiprocess
1197 debugging support
1198 </dd>
1199 </dl>
1200 <a NAME="DebugClientBase.startProgInDebugger" ID="DebugClientBase.startProgInDebugger"></a>
1201 <h4>DebugClientBase.startProgInDebugger</h4>
1202 <b>startProgInDebugger</b>(<i>progargs, wd='', host=None, port=None, exceptions=True, tracePython=False, redirect=True, passive=True, multiprocessSupport=False, codeStr=""</i>)
1203
1204 <p>
1205 Public method used to start the remote debugger.
1206 </p>
1207 <dl>
1208
1209 <dt><i>progargs</i></dt>
1210 <dd>
1211 commandline for the program to be debugged
1212 (list of strings)
1213 </dd>
1214 <dt><i>wd</i></dt>
1215 <dd>
1216 working directory for the program execution (string)
1132 </dd> 1217 </dd>
1133 <dt><i>host</i></dt> 1218 <dt><i>host</i></dt>
1134 <dd> 1219 <dd>
1135 hostname of the debug server (string) 1220 hostname of the debug server (string)
1136 </dd> 1221 </dd>
1137 <dt><i>port</i></dt> 1222 <dt><i>port</i></dt>
1138 <dd> 1223 <dd>
1139 portnumber of the debug server (int) 1224 portnumber of the debug server (int)
1140 </dd>
1141 <dt><i>enableTrace</i></dt>
1142 <dd>
1143 flag to enable the tracing function (boolean)
1144 </dd> 1225 </dd>
1145 <dt><i>exceptions</i></dt> 1226 <dt><i>exceptions</i></dt>
1146 <dd> 1227 <dd>
1147 flag to enable exception reporting of the IDE 1228 flag to enable exception reporting of the IDE
1148 (boolean) 1229 (boolean)
1155 <dt><i>redirect</i></dt> 1236 <dt><i>redirect</i></dt>
1156 <dd> 1237 <dd>
1157 flag indicating redirection of stdin, stdout and 1238 flag indicating redirection of stdin, stdout and
1158 stderr (boolean) 1239 stderr (boolean)
1159 </dd> 1240 </dd>
1160 </dl> 1241 <dt><i>passive</i> (bool)</dt>
1161 <a NAME="DebugClientBase.startProgInDebugger" ID="DebugClientBase.startProgInDebugger"></a> 1242 <dd>
1162 <h4>DebugClientBase.startProgInDebugger</h4> 1243 flag indicating a passive debugging session
1163 <b>startProgInDebugger</b>(<i>progargs, wd='', host=None, port=None, exceptions=True, tracePython=False, redirect=True</i>) 1244 </dd>
1164 1245 <dt><i>multiprocessSupport</i> (bool)</dt>
1165 <p> 1246 <dd>
1166 Public method used to start the remote debugger. 1247 flag indicating to enable multiprocess
1167 </p> 1248 debugging support
1168 <dl> 1249 </dd>
1169 1250 <dt><i>codeStr</i> (str)</dt>
1170 <dt><i>progargs</i></dt> 1251 <dd>
1171 <dd> 1252 string containing Python code to execute
1172 commandline for the program to be debugged 1253 </dd>
1173 (list of strings) 1254 </dl>
1174 </dd> 1255 <dl>
1175 <dt><i>wd</i></dt> 1256 <dt>Returns:</dt>
1176 <dd> 1257 <dd>
1177 working directory for the program execution (string) 1258 exit code of the debugged program
1178 </dd> 1259 </dd>
1179 <dt><i>host</i></dt> 1260 </dl>
1180 <dd> 1261 <dl>
1181 hostname of the debug server (string) 1262 <dt>Return Type:</dt>
1182 </dd> 1263 <dd>
1183 <dt><i>port</i></dt> 1264 int
1184 <dd>
1185 portnumber of the debug server (int)
1186 </dd>
1187 <dt><i>exceptions</i></dt>
1188 <dd>
1189 flag to enable exception reporting of the IDE
1190 (boolean)
1191 </dd>
1192 <dt><i>tracePython</i></dt>
1193 <dd>
1194 flag to enable tracing into the Python library
1195 (boolean)
1196 </dd>
1197 <dt><i>redirect</i></dt>
1198 <dd>
1199 flag indicating redirection of stdin, stdout and
1200 stderr (boolean)
1201 </dd> 1265 </dd>
1202 </dl> 1266 </dl>
1203 <a NAME="DebugClientBase.writeReady" ID="DebugClientBase.writeReady"></a> 1267 <a NAME="DebugClientBase.writeReady" ID="DebugClientBase.writeReady"></a>
1204 <h4>DebugClientBase.writeReady</h4> 1268 <h4>DebugClientBase.writeReady</h4>
1205 <b>writeReady</b>(<i>stream</i>) 1269 <b>writeReady</b>(<i>stream</i>)
1232 </dd> 1296 </dd>
1233 </dl> 1297 </dl>
1234 <div align="right"><a href="#top">Up</a></div> 1298 <div align="right"><a href="#top">Up</a></div>
1235 <hr /> 1299 <hr />
1236 <hr /> 1300 <hr />
1237 <a NAME="DebugClientFork" ID="DebugClientFork"></a>
1238 <h2>DebugClientFork</h2>
1239 <b>DebugClientFork</b>(<i></i>)
1240
1241 <p>
1242 Replacement for the standard os.fork().
1243 </p>
1244 <dl>
1245 <dt>Returns:</dt>
1246 <dd>
1247 result of the fork() call
1248 </dd>
1249 </dl>
1250 <div align="right"><a href="#top">Up</a></div>
1251 <hr />
1252 <hr />
1253 <a NAME="DebugClientInput" ID="DebugClientInput"></a> 1301 <a NAME="DebugClientInput" ID="DebugClientInput"></a>
1254 <h2>DebugClientInput</h2> 1302 <h2>DebugClientInput</h2>
1255 <b>DebugClientInput</b>(<i>prompt=""</i>) 1303 <b>DebugClientInput</b>(<i>prompt=""</i>)
1256 1304
1257 <p> 1305 <p>

eric ide

mercurial