MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / _Debugger

Class _Debugger

PySimpleGUI/PySimpleGUI.py:23663–24154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23661
23662
23663class _Debugger:
23664 debugger = None
23665 DEBUGGER_MAIN_WINDOW_THEME = 'dark grey 13'
23666 DEBUGGER_POPOUT_THEME = 'dark grey 13'
23667 WIDTH_VARIABLES = 23
23668 WIDTH_RESULTS = 46
23669
23670 WIDTH_WATCHER_VARIABLES = 20
23671 WIDTH_WATCHER_RESULTS = 60
23672
23673 WIDTH_LOCALS = 80
23674 NUM_AUTO_WATCH = 9
23675
23676 MAX_LINES_PER_RESULT_FLOATING = 4
23677 MAX_LINES_PER_RESULT_MAIN = 3
23678
23679 DEBUGGER_POPOUT_WINDOW_FONT = 'Sans 8'
23680 DEBUGGER_VARIABLE_DETAILS_FONT = 'Courier 10'
23681
23682 '''
23683 # # ######
23684 ## ## ## # # # # # ###### ##### # # #### #### ###### #####
23685 # # # # # # # ## # # # # # # # # # # # # # # #
23686 # # # # # # # # # # # ##### ##### # # # # ##### # #
23687 # # ###### # # # # # # # # # # # # ### # ### # #####
23688 # # # # # # ## # # # # # # # # # # # # # #
23689 # # # # # # # ###### ###### ##### #### #### #### ###### # #
23690 '''
23691
23692 def __init__(self):
23693 self.watcher_window = None # type: Window
23694 self.popout_window = None # type: Window
23695 self.local_choices = {}
23696 self.myrc = ''
23697 self.custom_watch = ''
23698 self.locals = {}
23699 self.globals = {}
23700 self.popout_choices = {}
23701
23702 # Includes the DUAL PANE (now 2 tabs)! Don't forget REPL is there too!
23703 def _build_main_debugger_window(self, location=(None, None)):
23704 old_theme = theme()
23705 theme(_Debugger.DEBUGGER_MAIN_WINDOW_THEME)
23706
23707 def InVar(key1):
23708 row1 = [T(' '),
23709 I(key=key1, size=(_Debugger.WIDTH_VARIABLES, 1)),
23710 T('', key=key1 + 'CHANGED_', size=(_Debugger.WIDTH_RESULTS, 1)), B('Detail', key=key1 + 'DETAIL_'),
23711 B('Obj', key=key1 + 'OBJ_'), ]
23712 return row1
23713
23714 variables_frame = [InVar('_VAR0_'),
23715 InVar('_VAR1_'),
23716 InVar('_VAR2_'), ]
23717
23718 interactive_frame = [[T('>>> '), In(size=(83, 1), key='-REPL-',
23719 tooltip='Type in any "expression" or "statement"\n and it will be disaplayed below.\nPress RETURN KEY instead of "Go"\nbutton for faster use'),
23720 B('Go', bind_return_key=True, visible=True)],

Callers 3

show_debugger_windowFunction · 0.85
_refresh_debuggerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected