36 """ |
36 """ |
37 Replacement for the standard input builtin. |
37 Replacement for the standard input builtin. |
38 |
38 |
39 This function works with the split debugger. |
39 This function works with the split debugger. |
40 |
40 |
41 @param prompt The prompt to be shown. (string) |
41 @param prompt prompt to be shown (string) |
|
42 @param echo flag indicating to echo the output (boolean) |
|
43 @return result of the input() call |
42 """ |
44 """ |
43 if DebugClientInstance is None or not DebugClientInstance.redirect: |
45 if DebugClientInstance is None or not DebugClientInstance.redirect: |
44 return DebugClientOrigInput(prompt) |
46 return DebugClientOrigInput(prompt) |
45 |
47 |
46 return DebugClientInstance.input(prompt, echo) |
48 return DebugClientInstance.input(prompt, echo) |
58 |
60 |
59 |
61 |
60 def DebugClientFork(): |
62 def DebugClientFork(): |
61 """ |
63 """ |
62 Replacement for the standard os.fork(). |
64 Replacement for the standard os.fork(). |
|
65 |
|
66 @return result of the fork() call |
63 """ |
67 """ |
64 if DebugClientInstance is None: |
68 if DebugClientInstance is None: |
65 return DebugClientOrigFork() |
69 return DebugClientOrigFork() |
66 |
70 |
67 return DebugClientInstance.fork() |
71 return DebugClientInstance.fork() |
262 @param target the start function of the target thread (i.e. the user code) |
266 @param target the start function of the target thread (i.e. the user code) |
263 @param args arguments to pass to target |
267 @param args arguments to pass to target |
264 @param kwargs keyword arguments to pass to target |
268 @param kwargs keyword arguments to pass to target |
265 @param mainThread True, if we are attaching to the already |
269 @param mainThread True, if we are attaching to the already |
266 started mainthread of the app |
270 started mainthread of the app |
267 @return The identifier of the created thread |
|
268 """ |
271 """ |
269 if self.debugging: |
272 if self.debugging: |
270 sys.setprofile(self.profile) |
273 sys.setprofile(self.profile) |
271 |
274 |
272 def __dumpThreadList(self): |
275 def __dumpThreadList(self): |
2063 else: |
2068 else: |
2064 print("No network port given. Aborting...") |
2069 print("No network port given. Aborting...") |
2065 |
2070 |
2066 def fork(self): |
2071 def fork(self): |
2067 """ |
2072 """ |
2068 Public method implementing a fork routine deciding which branch to follow. |
2073 Public method implementing a fork routine deciding which branch |
|
2074 to follow. |
|
2075 |
|
2076 @return process ID (integer) |
2069 """ |
2077 """ |
2070 if not self.fork_auto: |
2078 if not self.fork_auto: |
2071 self.write(DebugProtocol.RequestForkTo + '\n') |
2079 self.write(DebugProtocol.RequestForkTo + '\n') |
2072 self.eventLoop(True) |
2080 self.eventLoop(True) |
2073 pid = DebugClientOrigFork() |
2081 pid = DebugClientOrigFork() |