MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / wait_for_suspend

Function wait_for_suspend

tests_python/test_debugger.py:214–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212 check_error_msg(msg.replace(">", ">"))
213
214 def wait_for_suspend():
215 def accept_message(msg):
216 if msg.startswith("%s\t" % CMD_GET_BREAKPOINT_EXCEPTION) or ('stop_reason="%s"' % REASON_STOP_ON_BREAKPOINT) in msg:
217 return True
218 return False
219
220 # Order is not guaranteed.
221 msg1 = writer.wait_for_message(accept_message)
222 msg2 = writer.wait_for_message(accept_message)
223 try:
224 hitmsg = msg1
225 msg1.thread["stop_reason"]
226 except:
227 hitmsg = msg2
228 hit = writer._get_stack_as_hit(hitmsg)
229 writer.write_run_thread(hit.thread_id)
230
231 if expect_suspend:
232 wait_for_suspend()

Callers 1

Calls 3

wait_for_messageMethod · 0.80
_get_stack_as_hitMethod · 0.80
write_run_threadMethod · 0.80

Tested by

no test coverage detected