71 """ |
71 """ |
72 return self.__name |
72 return self.__name |
73 |
73 |
74 def traceThread(self): |
74 def traceThread(self): |
75 """ |
75 """ |
76 Private method to setup tracing for this thread. |
76 Public method to setup tracing for this thread. |
77 """ |
77 """ |
78 self.set_trace() |
78 self.set_trace() |
79 if not self._mainThread: |
79 if not self._mainThread: |
80 self.set_continue(False) |
80 self.set_continue(False) |
81 |
81 |
82 def bootstrap(self): |
82 def bootstrap(self): |
83 """ |
83 """ |
84 Private method to bootstrap the thread. |
84 Public method to bootstrap the thread. |
85 |
85 |
86 It wraps the call to the user function to enable tracing |
86 It wraps the call to the user function to enable tracing |
87 before hand. |
87 before hand. |
88 """ |
88 """ |
89 try: |
89 try: |
99 sys.settrace(None) |
99 sys.settrace(None) |
100 sys.setprofile(None) |
100 sys.setprofile(None) |
101 |
101 |
102 def trace_dispatch(self, frame, event, arg): |
102 def trace_dispatch(self, frame, event, arg): |
103 """ |
103 """ |
104 Private method wrapping the trace_dispatch of bdb.py. |
104 Public method wrapping the trace_dispatch of bdb.py. |
105 |
105 |
106 It wraps the call to dispatch tracing into |
106 It wraps the call to dispatch tracing into |
107 bdb to make sure we have locked the client to prevent multiple |
107 bdb to make sure we have locked the client to prevent multiple |
108 threads from entering the client event loop. |
108 threads from entering the client event loop. |
109 |
109 |