Refreshes the debugger windows. USERS should NOT be calling this function. Within PySimpleGUI it is called for the USER every time the Window.Read function is called. :return: return code False if user closed the main debugger window. :rtype: (bool)
()
| 24225 | |
| 24226 | |
| 24227 | def _refresh_debugger(): |
| 24228 | """ |
| 24229 | Refreshes the debugger windows. USERS should NOT be calling this function. Within PySimpleGUI it is called for the USER every time the Window.Read function is called. |
| 24230 | |
| 24231 | :return: return code False if user closed the main debugger window. |
| 24232 | :rtype: (bool) |
| 24233 | """ |
| 24234 | if _Debugger.debugger is None: |
| 24235 | _Debugger.debugger = _Debugger() |
| 24236 | debugger = _Debugger.debugger |
| 24237 | Window._read_call_from_debugger = True |
| 24238 | rc = None |
| 24239 | # frame = inspect.currentframe() |
| 24240 | # frame = inspect.currentframe().f_back |
| 24241 | |
| 24242 | frame, *others = inspect.stack()[1] |
| 24243 | try: |
| 24244 | debugger.locals = frame.f_back.f_locals |
| 24245 | debugger.globals = frame.f_back.f_globals |
| 24246 | finally: |
| 24247 | del frame |
| 24248 | if debugger.popout_window: |
| 24249 | rc = debugger._refresh_floating_window() |
| 24250 | if debugger.watcher_window: |
| 24251 | rc = debugger._refresh_main_debugger_window(debugger.locals, debugger.globals) |
| 24252 | Window._read_call_from_debugger = False |
| 24253 | return rc |
| 24254 | |
| 24255 | |
| 24256 | def _debugger_window_is_open(): |
no test coverage detected