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(0) |
80 self.set_continue(0) |
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: |
100 sys.settrace(None) |
100 sys.settrace(None) |
101 sys.setprofile(None) |
101 sys.setprofile(None) |
102 |
102 |
103 def trace_dispatch(self, frame, event, arg): |
103 def trace_dispatch(self, frame, event, arg): |
104 """ |
104 """ |
105 Private method wrapping the trace_dispatch of bdb.py. |
105 Public method wrapping the trace_dispatch of bdb.py. |
106 |
106 |
107 It wraps the call to dispatch tracing into |
107 It wraps the call to dispatch tracing into |
108 bdb to make sure we have locked the client to prevent multiple |
108 bdb to make sure we have locked the client to prevent multiple |
109 threads from entering the client event loop. |
109 threads from entering the client event loop. |
110 |
110 |