Documentation/Source/eric5.DebugClients.Python.DebugThread.html

changeset 58
37f0444c3479
parent 21
b88a0e6268bd
child 409
0ea528e80202
equal deleted inserted replaced
57:81326a94fdca 58:37f0444c3479
20 </style> 20 </style>
21 </head> 21 </head>
22 <body><a NAME="top" ID="top"></a> 22 <body><a NAME="top" ID="top"></a>
23 <h1>eric5.DebugClients.Python.DebugThread</h1> 23 <h1>eric5.DebugClients.Python.DebugThread</h1>
24 <p> 24 <p>
25 &#77;&#111;&#100;&#117;&#108;&#101; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#100;&#101;&#98;&#117;&#103; &#116;&#104;&#114;&#101;&#97;&#100;. 25 Module implementing the debug thread.
26 </p> 26 </p>
27 <h3>Global Attributes</h3> 27 <h3>Global Attributes</h3>
28 <table> 28 <table>
29 <tr><td>None</td></tr> 29 <tr><td>None</td></tr>
30 </table> 30 </table>
31 <h3>Classes</h3> 31 <h3>Classes</h3>
32 <table> 32 <table>
33 <tr> 33 <tr>
34 <td><a href="#DebugThread">DebugThread</a></td> 34 <td><a href="#DebugThread">DebugThread</a></td>
35 <td>&#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#97; &#100;&#101;&#98;&#117;&#103; &#116;&#104;&#114;&#101;&#97;&#100;.</td> 35 <td>Class implementing a debug thread.</td>
36 </tr> 36 </tr>
37 </table> 37 </table>
38 <h3>Functions</h3> 38 <h3>Functions</h3>
39 <table> 39 <table>
40 <tr><td>None</td></tr> 40 <tr><td>None</td></tr>
41 </table> 41 </table>
42 <hr /><hr /> 42 <hr /><hr />
43 <a NAME="DebugThread" ID="DebugThread"></a> 43 <a NAME="DebugThread" ID="DebugThread"></a>
44 <h2>DebugThread</h2> 44 <h2>DebugThread</h2>
45 <p> 45 <p>
46 &#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#97; &#100;&#101;&#98;&#117;&#103; &#116;&#104;&#114;&#101;&#97;&#100;. 46 Class implementing a debug thread.
47 </p><p> 47 </p><p>
48 &#73;&#116; &#114;&#101;&#112;&#114;&#101;&#115;&#101;&#110;&#116;&#115; &#97; &#116;&#104;&#114;&#101;&#97;&#100; &#105;&#110; &#116;&#104;&#101; &#112;y&#116;&#104;&#111;&#110; &#105;&#110;&#116;&#101;&#114;&#112;&#114;&#101;&#116;&#101;&#114; &#116;&#104;&#97;&#116; w&#101; &#97;&#114;&#101; &#116;&#114;&#97;&#99;&#105;&#110;&#103;. 48 It represents a thread in the python interpreter that we are tracing.
49 </p><p> 49 </p><p>
50 &#80;&#114;&#111;v&#105;&#100;&#101;&#115; &#115;&#105;&#109;&#112;&#108;&#101; w&#114;&#97;&#112;&#112;&#101;&#114; &#109;&#101;&#116;&#104;&#111;&#100;&#115; &#97;&#114;&#111;&#117;&#110;&#100; &#98;&#100;&#98; &#102;&#111;&#114; &#116;&#104;&#101; '&#111;w&#110;&#105;&#110;&#103;' &#99;&#108;&#105;&#101;&#110;&#116; &#116;&#111; 50 Provides simple wrapper methods around bdb for the 'owning' client to
51 &#99;&#97;&#108;&#108; &#116;&#111; &#115;&#116;&#101;&#112; &#101;&#116;&#99;. 51 call to step etc.
52 </p> 52 </p>
53 <h3>Derived from</h3> 53 <h3>Derived from</h3>
54 DebugBase 54 DebugBase
55 <h3>Class Attributes</h3> 55 <h3>Class Attributes</h3>
56 <table> 56 <table>
58 </table> 58 </table>
59 <h3>Methods</h3> 59 <h3>Methods</h3>
60 <table> 60 <table>
61 <tr> 61 <tr>
62 <td><a href="#DebugThread.__init__">DebugThread</a></td> 62 <td><a href="#DebugThread.__init__">DebugThread</a></td>
63 <td>&#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;</td> 63 <td>Constructor</td>
64 </tr><tr> 64 </tr><tr>
65 <td><a href="#DebugThread.bootstrap">bootstrap</a></td> 65 <td><a href="#DebugThread.bootstrap">bootstrap</a></td>
66 <td>&#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#98;&#111;&#111;&#116;&#115;&#116;&#114;&#97;&#112; &#116;&#104;&#101; &#116;&#104;&#114;&#101;&#97;&#100;.</td> 66 <td>Private method to bootstrap the thread.</td>
67 </tr><tr> 67 </tr><tr>
68 <td><a href="#DebugThread.get_ident">get_ident</a></td> 68 <td><a href="#DebugThread.get_ident">get_ident</a></td>
69 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#117;&#114;&#110; &#116;&#104;&#101; &#105;&#100; &#111;&#102; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100;.</td> 69 <td>Public method to return the id of this thread.</td>
70 </tr><tr> 70 </tr><tr>
71 <td><a href="#DebugThread.get_name">get_name</a></td> 71 <td><a href="#DebugThread.get_name">get_name</a></td>
72 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#117;&#114;&#110; &#116;&#104;&#101; &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100;.</td> 72 <td>Public method to return the name of this thread.</td>
73 </tr><tr> 73 </tr><tr>
74 <td><a href="#DebugThread.set_ident">set_ident</a></td> 74 <td><a href="#DebugThread.set_ident">set_ident</a></td>
75 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#101;&#116; &#116;&#104;&#101; &#105;&#100; &#102;&#111;&#114; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100;.</td> 75 <td>Public method to set the id for this thread.</td>
76 </tr><tr> 76 </tr><tr>
77 <td><a href="#DebugThread.traceThread">traceThread</a></td> 77 <td><a href="#DebugThread.traceThread">traceThread</a></td>
78 <td>&#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#101;&#116;&#117;&#112; &#116;&#114;&#97;&#99;&#105;&#110;&#103; &#102;&#111;&#114; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100;.</td> 78 <td>Private method to setup tracing for this thread.</td>
79 </tr><tr> 79 </tr><tr>
80 <td><a href="#DebugThread.trace_dispatch">trace_dispatch</a></td> 80 <td><a href="#DebugThread.trace_dispatch">trace_dispatch</a></td>
81 <td>&#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; w&#114;&#97;&#112;&#112;&#105;&#110;&#103; &#116;&#104;&#101; &#116;&#114;&#97;&#99;&#101;&#95;&#100;&#105;&#115;&#112;&#97;&#116;&#99;&#104; &#111;&#102; &#98;&#100;&#98;.&#112;y.</td> 81 <td>Private method wrapping the trace_dispatch of bdb.py.</td>
82 </tr> 82 </tr>
83 </table> 83 </table>
84 <a NAME="DebugThread.__init__" ID="DebugThread.__init__"></a> 84 <a NAME="DebugThread.__init__" ID="DebugThread.__init__"></a>
85 <h4>DebugThread (Constructor)</h4> 85 <h4>DebugThread (Constructor)</h4>
86 <b>DebugThread</b>(<i>dbgClient, targ = None, args = None, kwargs = None, mainThread = 0</i>) 86 <b>DebugThread</b>(<i>dbgClient, targ = None, args = None, kwargs = None, mainThread = 0</i>)
87 <p> 87 <p>
88 &#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114; 88 Constructor
89 </p><dl> 89 </p><dl>
90 <dt><i>dbgClient</i></dt> 90 <dt><i>dbgClient</i></dt>
91 <dd> 91 <dd>
92 &#116;&#104;&#101; &#111;w&#110;&#105;&#110;&#103; &#99;&#108;&#105;&#101;&#110;&#116; 92 the owning client
93 </dd><dt><i>targ</i></dt> 93 </dd><dt><i>targ</i></dt>
94 <dd> 94 <dd>
95 &#116;&#104;&#101; &#116;&#97;&#114;&#103;&#101;&#116; &#109;&#101;&#116;&#104;&#111;&#100; &#105;&#110; &#116;&#104;&#101; &#114;&#117;&#110; &#116;&#104;&#114;&#101;&#97;&#100; 95 the target method in the run thread
96 </dd><dt><i>args</i></dt> 96 </dd><dt><i>args</i></dt>
97 <dd> 97 <dd>
98 &#97;&#114;&#103;&#117;&#109;&#101;&#110;&#116;&#115; &#116;&#111; &#98;&#101; &#112;&#97;&#115;&#115;&#101;&#100; &#116;&#111; &#116;&#104;&#101; &#116;&#104;&#114;&#101;&#97;&#100; 98 arguments to be passed to the thread
99 </dd><dt><i>kwargs</i></dt> 99 </dd><dt><i>kwargs</i></dt>
100 <dd> 100 <dd>
101 &#97;&#114;&#103;&#117;&#109;&#101;&#110;&#116;&#115; &#116;&#111; &#98;&#101; &#112;&#97;&#115;&#115;&#101;&#100; &#116;&#111; &#116;&#104;&#101; &#116;&#104;&#114;&#101;&#97;&#100; 101 arguments to be passed to the thread
102 </dd><dt><i>mainThread</i></dt> 102 </dd><dt><i>mainThread</i></dt>
103 <dd> 103 <dd>
104 &#48; &#105;&#102; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100; &#105;&#115; &#110;&#111;&#116; &#116;&#104;&#101; &#109;&#97;&#105;&#110;&#115;&#99;&#114;&#105;&#112;&#116;&#115; &#116;&#104;&#114;&#101;&#97;&#100; 104 0 if this thread is not the mainscripts thread
105 </dd> 105 </dd>
106 </dl><a NAME="DebugThread.bootstrap" ID="DebugThread.bootstrap"></a> 106 </dl><a NAME="DebugThread.bootstrap" ID="DebugThread.bootstrap"></a>
107 <h4>DebugThread.bootstrap</h4> 107 <h4>DebugThread.bootstrap</h4>
108 <b>bootstrap</b>(<i></i>) 108 <b>bootstrap</b>(<i></i>)
109 <p> 109 <p>
110 &#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#98;&#111;&#111;&#116;&#115;&#116;&#114;&#97;&#112; &#116;&#104;&#101; &#116;&#104;&#114;&#101;&#97;&#100;. 110 Private method to bootstrap the thread.
111 </p><p> 111 </p><p>
112 &#73;&#116; w&#114;&#97;&#112;&#115; &#116;&#104;&#101; &#99;&#97;&#108;&#108; &#116;&#111; &#116;&#104;&#101; &#117;&#115;&#101;&#114; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#101;&#110;&#97;&#98;&#108;&#101; &#116;&#114;&#97;&#99;&#105;&#110;&#103; 112 It wraps the call to the user function to enable tracing
113 &#98;&#101;&#102;&#111;&#114;&#101; &#104;&#97;&#110;&#100;. 113 before hand.
114 </p><a NAME="DebugThread.get_ident" ID="DebugThread.get_ident"></a> 114 </p><a NAME="DebugThread.get_ident" ID="DebugThread.get_ident"></a>
115 <h4>DebugThread.get_ident</h4> 115 <h4>DebugThread.get_ident</h4>
116 <b>get_ident</b>(<i></i>) 116 <b>get_ident</b>(<i></i>)
117 <p> 117 <p>
118 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#117;&#114;&#110; &#116;&#104;&#101; &#105;&#100; &#111;&#102; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100;. 118 Public method to return the id of this thread.
119 </p><dl> 119 </p><dl>
120 <dt>Returns:</dt> 120 <dt>Returns:</dt>
121 <dd> 121 <dd>
122 &#116;&#104;&#101; &#105;&#100; &#111;&#102; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100; (&#105;&#110;&#116;) 122 the id of this thread (int)
123 </dd> 123 </dd>
124 </dl><a NAME="DebugThread.get_name" ID="DebugThread.get_name"></a> 124 </dl><a NAME="DebugThread.get_name" ID="DebugThread.get_name"></a>
125 <h4>DebugThread.get_name</h4> 125 <h4>DebugThread.get_name</h4>
126 <b>get_name</b>(<i></i>) 126 <b>get_name</b>(<i></i>)
127 <p> 127 <p>
128 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#117;&#114;&#110; &#116;&#104;&#101; &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100;. 128 Public method to return the name of this thread.
129 </p><dl> 129 </p><dl>
130 <dt>Returns:</dt> 130 <dt>Returns:</dt>
131 <dd> 131 <dd>
132 &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100; (&#115;&#116;&#114;&#105;&#110;&#103;) 132 name of this thread (string)
133 </dd> 133 </dd>
134 </dl><a NAME="DebugThread.set_ident" ID="DebugThread.set_ident"></a> 134 </dl><a NAME="DebugThread.set_ident" ID="DebugThread.set_ident"></a>
135 <h4>DebugThread.set_ident</h4> 135 <h4>DebugThread.set_ident</h4>
136 <b>set_ident</b>(<i>id</i>) 136 <b>set_ident</b>(<i>id</i>)
137 <p> 137 <p>
138 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#101;&#116; &#116;&#104;&#101; &#105;&#100; &#102;&#111;&#114; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100;. 138 Public method to set the id for this thread.
139 </p><dl> 139 </p><dl>
140 <dt><i>id</i></dt> 140 <dt><i>id</i></dt>
141 <dd> 141 <dd>
142 &#105;&#100; &#102;&#111;&#114; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100; (&#105;&#110;&#116;) 142 id for this thread (int)
143 </dd> 143 </dd>
144 </dl><a NAME="DebugThread.traceThread" ID="DebugThread.traceThread"></a> 144 </dl><a NAME="DebugThread.traceThread" ID="DebugThread.traceThread"></a>
145 <h4>DebugThread.traceThread</h4> 145 <h4>DebugThread.traceThread</h4>
146 <b>traceThread</b>(<i></i>) 146 <b>traceThread</b>(<i></i>)
147 <p> 147 <p>
148 &#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#101;&#116;&#117;&#112; &#116;&#114;&#97;&#99;&#105;&#110;&#103; &#102;&#111;&#114; &#116;&#104;&#105;&#115; &#116;&#104;&#114;&#101;&#97;&#100;. 148 Private method to setup tracing for this thread.
149 </p><a NAME="DebugThread.trace_dispatch" ID="DebugThread.trace_dispatch"></a> 149 </p><a NAME="DebugThread.trace_dispatch" ID="DebugThread.trace_dispatch"></a>
150 <h4>DebugThread.trace_dispatch</h4> 150 <h4>DebugThread.trace_dispatch</h4>
151 <b>trace_dispatch</b>(<i>frame, event, arg</i>) 151 <b>trace_dispatch</b>(<i>frame, event, arg</i>)
152 <p> 152 <p>
153 &#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; w&#114;&#97;&#112;&#112;&#105;&#110;&#103; &#116;&#104;&#101; &#116;&#114;&#97;&#99;&#101;&#95;&#100;&#105;&#115;&#112;&#97;&#116;&#99;&#104; &#111;&#102; &#98;&#100;&#98;.&#112;y. 153 Private method wrapping the trace_dispatch of bdb.py.
154 </p><p> 154 </p><p>
155 &#73;&#116; w&#114;&#97;&#112;&#115; &#116;&#104;&#101; &#99;&#97;&#108;&#108; &#116;&#111; &#100;&#105;&#115;&#112;&#97;&#116;&#99;&#104; &#116;&#114;&#97;&#99;&#105;&#110;&#103; &#105;&#110;&#116;&#111; 155 It wraps the call to dispatch tracing into
156 &#98;&#100;&#98; &#116;&#111; &#109;&#97;&#107;&#101; &#115;&#117;&#114;&#101; w&#101; &#104;&#97;v&#101; &#108;&#111;&#99;&#107;&#101;&#100; &#116;&#104;&#101; &#99;&#108;&#105;&#101;&#110;&#116; &#116;&#111; &#112;&#114;&#101;v&#101;&#110;&#116; &#109;&#117;&#108;&#116;&#105;&#112;&#108;&#101; 156 bdb to make sure we have locked the client to prevent multiple
157 &#116;&#104;&#114;&#101;&#97;&#100;&#115; &#102;&#114;&#111;&#109; &#101;&#110;&#116;&#101;&#114;&#105;&#110;&#103; &#116;&#104;&#101; &#99;&#108;&#105;&#101;&#110;&#116; &#101;v&#101;&#110;&#116; &#108;&#111;&#111;&#112;. 157 threads from entering the client event loop.
158 </p><dl> 158 </p><dl>
159 <dt><i>frame</i></dt> 159 <dt><i>frame</i></dt>
160 <dd> 160 <dd>
161 &#84;&#104;&#101; &#99;&#117;&#114;&#114;&#101;&#110;&#116; &#115;&#116;&#97;&#99;&#107; &#102;&#114;&#97;&#109;&#101;. 161 The current stack frame.
162 </dd><dt><i>event</i></dt> 162 </dd><dt><i>event</i></dt>
163 <dd> 163 <dd>
164 &#84;&#104;&#101; &#116;&#114;&#97;&#99;&#101; &#101;v&#101;&#110;&#116; (&#115;&#116;&#114;&#105;&#110;&#103;) 164 The trace event (string)
165 </dd><dt><i>arg</i></dt> 165 </dd><dt><i>arg</i></dt>
166 <dd> 166 <dd>
167 &#84;&#104;&#101; &#97;&#114;&#103;&#117;&#109;&#101;&#110;&#116;&#115; 167 The arguments
168 </dd> 168 </dd>
169 </dl><dl> 169 </dl><dl>
170 <dt>Returns:</dt> 170 <dt>Returns:</dt>
171 <dd> 171 <dd>
172 &#108;&#111;&#99;&#97;&#108; &#116;&#114;&#97;&#99;&#101; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; 172 local trace function
173 </dd> 173 </dd>
174 </dl> 174 </dl>
175 <div align="right"><a href="#top">Up</a></div> 175 <div align="right"><a href="#top">Up</a></div>
176 <hr /> 176 <hr />
177 </body></html> 177 </body></html>

eric ide

mercurial