(thread, stop_reason: int, original_step_cmd: int = -1, main_suspend: bool = True)
| 26 | |
| 27 | |
| 28 | def mark_thread_suspended(thread, stop_reason: int, original_step_cmd: int = -1, main_suspend: bool = True): |
| 29 | pydev_log.info("Marking thread suspended. Name: %s, stop_reason: %s, main_suspend: %s", thread.name, stop_reason, main_suspend) |
| 30 | info = set_additional_thread_info(thread) |
| 31 | info.suspend_type = PYTHON_SUSPEND |
| 32 | if original_step_cmd != -1: |
| 33 | stop_reason = original_step_cmd |
| 34 | thread.stop_reason = stop_reason |
| 35 | |
| 36 | # Note: don't set the 'pydev_original_step_cmd' here if unset. |
| 37 | |
| 38 | if not main_suspend: |
| 39 | info.pydev_step_cmd = CMD_THREAD_SUSPEND |
| 40 | info.pydev_step_stop = None |
| 41 | elif info.pydev_step_cmd == -1: |
| 42 | # If the step command is not specified, set it to step into |
| 43 | # to make sure it'll break as soon as possible. |
| 44 | info.pydev_step_cmd = CMD_STEP_INTO |
| 45 | info.pydev_step_stop = None |
| 46 | |
| 47 | # Mark as suspended as the last thing. |
| 48 | info.pydev_state = STATE_SUSPEND |
| 49 | info.update_stepping_info() |
| 50 | return info |
| 51 | |
| 52 | |
| 53 | def internal_run_thread(thread, set_additional_thread_info): |
no test coverage detected