设置是否启用调试模式 / Set whether to enable debug mode 调试模式下, RecoDetail 将可以获取到 raw/draws; 所有任务都会被视为 focus 而产生回调 In debug mode, RecoDetail can retrieve raw/draws; all tasks are treated as focus and produce callbacks Args: debug_mode: 是否启用调试模式 / Whether to enable
(debug_mode: bool)
| 692 | |
| 693 | @staticmethod |
| 694 | def set_debug_mode(debug_mode: bool) -> bool: |
| 695 | """设置是否启用调试模式 / Set whether to enable debug mode |
| 696 | |
| 697 | 调试模式下, RecoDetail 将可以获取到 raw/draws; 所有任务都会被视为 focus 而产生回调 |
| 698 | In debug mode, RecoDetail can retrieve raw/draws; all tasks are treated as focus and produce |
| 699 | callbacks |
| 700 | |
| 701 | Args: |
| 702 | debug_mode: 是否启用调试模式 / Whether to enable debug mode |
| 703 | |
| 704 | Returns: |
| 705 | bool: 是否成功 / Whether successful |
| 706 | """ |
| 707 | cbool = ctypes.c_bool(debug_mode) |
| 708 | return bool( |
| 709 | Library.framework().MaaGlobalSetOption( |
| 710 | MaaOption(MaaGlobalOptionEnum.DebugMode), |
| 711 | ctypes.pointer(cbool), |
| 712 | ctypes.sizeof(ctypes.c_bool), |
| 713 | ) |
| 714 | ) |
| 715 | |
| 716 | @staticmethod |
| 717 | def set_save_on_error(save_on_error: bool) -> bool: |