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

changeset 5245
e1908fd9deac
child 5559
072d97551334
equal deleted inserted replaced
5244:54a0f215a6f0 5245:e1908fd9deac
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.DebugClients.Python.ThreadExtension</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.DebugClients.Python.ThreadExtension</h1>
23 <p>
24 Module implementing an import hook patching thread modules to get debugged too.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#QThreadWrapper">QThreadWrapper</a></td>
34 <td></td>
35 </tr><tr>
36 <td><a href="#ThreadExtension">ThreadExtension</a></td>
37 <td>Class implementing the thread support for the debugger.</td>
38 </tr>
39 </table>
40 <h3>Functions</h3>
41 <table>
42 <tr><td>None</td></tr>
43 </table>
44 <hr /><hr />
45 <a NAME="QThreadWrapper" ID="QThreadWrapper"></a>
46 <h2>QThreadWrapper</h2>
47
48 <h3>Derived from</h3>
49 module.QThread
50 <h3>Class Attributes</h3>
51 <table>
52 <tr><td>__qtThreadNumber</td></tr>
53 </table>
54 <h3>Class Methods</h3>
55 <table>
56 <tr><td>None</td></tr>
57 </table>
58 <h3>Methods</h3>
59 <table>
60 <tr>
61 <td><a href="#QThreadWrapper.__init__">QThreadWrapper</a></td>
62 <td></td>
63 </tr><tr>
64 <td><a href="#QThreadWrapper.__bootstrapQThread">__bootstrapQThread</a></td>
65 <td></td>
66 </tr>
67 </table>
68 <h3>Static Methods</h3>
69 <table>
70 <tr><td>None</td></tr>
71 </table>
72 <a NAME="QThreadWrapper.__init__" ID="QThreadWrapper.__init__"></a>
73 <h4>QThreadWrapper (Constructor)</h4>
74 <b>QThreadWrapper</b>(<i>*args, **kwargs</i>)
75 <a NAME="QThreadWrapper.__bootstrapQThread" ID="QThreadWrapper.__bootstrapQThread"></a>
76 <h4>QThreadWrapper.__bootstrapQThread</h4>
77 <b>__bootstrapQThread</b>(<i></i>)
78
79 <div align="right"><a href="#top">Up</a></div>
80 <hr /><hr />
81 <a NAME="ThreadExtension" ID="ThreadExtension"></a>
82 <h2>ThreadExtension</h2>
83 <p>
84 Class implementing the thread support for the debugger.
85 </p><p>
86 Provides methods for intercepting thread creation, retriving the running
87 threads and their name and state.
88 </p>
89 <h3>Derived from</h3>
90 object
91 <h3>Class Attributes</h3>
92 <table>
93 <tr><td>None</td></tr>
94 </table>
95 <h3>Class Methods</h3>
96 <table>
97 <tr><td>None</td></tr>
98 </table>
99 <h3>Methods</h3>
100 <table>
101 <tr>
102 <td><a href="#ThreadExtension.__init__">ThreadExtension</a></td>
103 <td>Constructor</td>
104 </tr><tr>
105 <td><a href="#ThreadExtension.attachThread">attachThread</a></td>
106 <td>Public method to setup a standard thread for DebugClient to debug.</td>
107 </tr><tr>
108 <td><a href="#ThreadExtension.dumpThreadList">dumpThreadList</a></td>
109 <td>Public method to send the list of threads.</td>
110 </tr><tr>
111 <td><a href="#ThreadExtension.find_module">find_module</a></td>
112 <td>Public method returning the module loader.</td>
113 </tr><tr>
114 <td><a href="#ThreadExtension.getExecutedFrame">getExecutedFrame</a></td>
115 <td>Public method to return the currently executed frame.</td>
116 </tr><tr>
117 <td><a href="#ThreadExtension.load_module">load_module</a></td>
118 <td>Public method to load a module.</td>
119 </tr><tr>
120 <td><a href="#ThreadExtension.lockClient">lockClient</a></td>
121 <td>Public method to acquire the lock for this client.</td>
122 </tr><tr>
123 <td><a href="#ThreadExtension.setCurrentThread">setCurrentThread</a></td>
124 <td>Public method to set the current thread.</td>
125 </tr><tr>
126 <td><a href="#ThreadExtension.threadTerminated">threadTerminated</a></td>
127 <td>Public method called when a DebugThread has exited.</td>
128 </tr><tr>
129 <td><a href="#ThreadExtension.unlockClient">unlockClient</a></td>
130 <td>Public method to release the lock for this client.</td>
131 </tr><tr>
132 <td><a href="#ThreadExtension.updateThreadList">updateThreadList</a></td>
133 <td>Public method to update the list of running threads.</td>
134 </tr>
135 </table>
136 <h3>Static Methods</h3>
137 <table>
138 <tr><td>None</td></tr>
139 </table>
140 <a NAME="ThreadExtension.__init__" ID="ThreadExtension.__init__"></a>
141 <h4>ThreadExtension (Constructor)</h4>
142 <b>ThreadExtension</b>(<i></i>)
143 <p>
144 Constructor
145 </p><a NAME="ThreadExtension.attachThread" ID="ThreadExtension.attachThread"></a>
146 <h4>ThreadExtension.attachThread</h4>
147 <b>attachThread</b>(<i>target=None, args=None, kwargs={}, mainThread=False</i>)
148 <p>
149 Public method to setup a standard thread for DebugClient to debug.
150 </p><p>
151 If mainThread is True, then we are attaching to the already
152 started mainthread of the app and the rest of the args are ignored.
153 </p><dl>
154 <dt><i>target</i></dt>
155 <dd>
156 the start function of the target thread (i.e. the user
157 code)
158 </dd><dt><i>args</i></dt>
159 <dd>
160 arguments to pass to target
161 </dd><dt><i>kwargs</i></dt>
162 <dd>
163 keyword arguments to pass to target
164 </dd><dt><i>mainThread</i></dt>
165 <dd>
166 True, if we are attaching to the already
167 started mainthread of the app
168 </dd>
169 </dl><dl>
170 <dt>Returns:</dt>
171 <dd>
172 identifier of the created thread
173 </dd>
174 </dl><a NAME="ThreadExtension.dumpThreadList" ID="ThreadExtension.dumpThreadList"></a>
175 <h4>ThreadExtension.dumpThreadList</h4>
176 <b>dumpThreadList</b>(<i></i>)
177 <p>
178 Public method to send the list of threads.
179 </p><a NAME="ThreadExtension.find_module" ID="ThreadExtension.find_module"></a>
180 <h4>ThreadExtension.find_module</h4>
181 <b>find_module</b>(<i>fullname, path=None</i>)
182 <p>
183 Public method returning the module loader.
184 </p><dl>
185 <dt><i>fullname</i> (str)</dt>
186 <dd>
187 name of the module to be loaded
188 </dd><dt><i>path</i> (str)</dt>
189 <dd>
190 path to resolve the module name
191 </dd>
192 </dl><dl>
193 <dt>Returns:</dt>
194 <dd>
195 module loader object
196 </dd>
197 </dl><dl>
198 <dt>Return Type:</dt>
199 <dd>
200 object
201 </dd>
202 </dl><a NAME="ThreadExtension.getExecutedFrame" ID="ThreadExtension.getExecutedFrame"></a>
203 <h4>ThreadExtension.getExecutedFrame</h4>
204 <b>getExecutedFrame</b>(<i>frame</i>)
205 <p>
206 Public method to return the currently executed frame.
207 </p><dl>
208 <dt><i>frame</i> (frame object)</dt>
209 <dd>
210 the current frame
211 </dd>
212 </dl><dl>
213 <dt>Returns:</dt>
214 <dd>
215 the frame which is excecuted (without debugger frames)
216 </dd>
217 </dl><dl>
218 <dt>Return Type:</dt>
219 <dd>
220 frame object
221 </dd>
222 </dl><a NAME="ThreadExtension.load_module" ID="ThreadExtension.load_module"></a>
223 <h4>ThreadExtension.load_module</h4>
224 <b>load_module</b>(<i>fullname</i>)
225 <p>
226 Public method to load a module.
227 </p><dl>
228 <dt><i>fullname</i> (str)</dt>
229 <dd>
230 name of the module to be loaded
231 </dd>
232 </dl><dl>
233 <dt>Returns:</dt>
234 <dd>
235 reference to the loaded module
236 </dd>
237 </dl><dl>
238 <dt>Return Type:</dt>
239 <dd>
240 module
241 </dd>
242 </dl><a NAME="ThreadExtension.lockClient" ID="ThreadExtension.lockClient"></a>
243 <h4>ThreadExtension.lockClient</h4>
244 <b>lockClient</b>(<i>blocking=True</i>)
245 <p>
246 Public method to acquire the lock for this client.
247 </p><dl>
248 <dt><i>blocking</i> (bool)</dt>
249 <dd>
250 flag to indicating a blocking lock
251 </dd>
252 </dl><dl>
253 <dt>Returns:</dt>
254 <dd>
255 flag indicating successful locking
256 </dd>
257 </dl><dl>
258 <dt>Return Type:</dt>
259 <dd>
260 bool
261 </dd>
262 </dl><a NAME="ThreadExtension.setCurrentThread" ID="ThreadExtension.setCurrentThread"></a>
263 <h4>ThreadExtension.setCurrentThread</h4>
264 <b>setCurrentThread</b>(<i>id</i>)
265 <p>
266 Public method to set the current thread.
267 </p><dl>
268 <dt><i>id</i> (int)</dt>
269 <dd>
270 the id the current thread should be set to.
271 </dd>
272 </dl><a NAME="ThreadExtension.threadTerminated" ID="ThreadExtension.threadTerminated"></a>
273 <h4>ThreadExtension.threadTerminated</h4>
274 <b>threadTerminated</b>(<i>threadId</i>)
275 <p>
276 Public method called when a DebugThread has exited.
277 </p><dl>
278 <dt><i>threadId</i> (int)</dt>
279 <dd>
280 id of the DebugThread that has exited
281 </dd>
282 </dl><a NAME="ThreadExtension.unlockClient" ID="ThreadExtension.unlockClient"></a>
283 <h4>ThreadExtension.unlockClient</h4>
284 <b>unlockClient</b>(<i></i>)
285 <p>
286 Public method to release the lock for this client.
287 </p><a NAME="ThreadExtension.updateThreadList" ID="ThreadExtension.updateThreadList"></a>
288 <h4>ThreadExtension.updateThreadList</h4>
289 <b>updateThreadList</b>(<i></i>)
290 <p>
291 Public method to update the list of running threads.
292 </p>
293 <div align="right"><a href="#top">Up</a></div>
294 <hr />
295 </body></html>

eric ide

mercurial