58 # reset already imported thread module to apply hooks at next import |
58 # reset already imported thread module to apply hooks at next import |
59 del sys.modules[self.threadModName] |
59 del sys.modules[self.threadModName] |
60 del sys.modules['threading'] |
60 del sys.modules['threading'] |
61 |
61 |
62 sys.meta_path.insert(0, self) |
62 sys.meta_path.insert(0, self) |
63 |
|
64 # provide a hook to perform a hard breakpoint |
|
65 # Use it like this: |
|
66 # if hasattr(sys, 'breakpoint): sys.breakpoint() |
|
67 sys.breakpoint = self.set_trace |
|
68 |
63 |
69 def attachThread(self, target=None, args=None, kwargs={}, |
64 def attachThread(self, target=None, args=None, kwargs={}, |
70 mainThread=False): |
65 mainThread=False): |
71 """ |
66 """ |
72 Public method to setup a standard thread for DebugClient to debug. |
67 Public method to setup a standard thread for DebugClient to debug. |