imwatchingyou.show_popout_window() 3. You must find a location in your code to "refresh" the debugger. Some loop that's executed often. In this loop add this call: imwatchingyou.refresh() """ layout = [ [sg.Text('A typical PSG application')], [sg.Input(key='-IN-')], [sg.Text(' ', key='-OUT-', size=(45, 1))], [sg.CBox('Checkbox 1'), sg.CBox('Checkbox 2')], [sg.Radio('a', 1, key='-R1-'), sg.Radio('b', 1, key='-R2-'), sg.Radio('c', 1, key='-R3-')], [sg.Combo(['c1', 'c2', 'c3'], size=(6, 3), key='-COMBO-')], [sg.Output(size=(50, 6))], [sg.Ok(), sg.Exit(), sg.Button('Enable'), sg.Debug(key='Debug')], ] window = sg.Window('This is your Application Window', layout, debugger_enabled=False) counter = 0 while True: # Your Event Loop event, values = window.read(timeout=100) if event in (sg.WIN_CLOSED, 'Exit'): break elif event == 'Enable': window.enable_debugger() counter += 1 # to prove window is operating, show the input in another area in the window. window['-OUT-'].update(values['-IN-'])
[sg.Text(' ', key='-OUT-', size=(45, 1))], [sg.CBox('Checkbox 1'), sg.CBox('Checkbox 2')], [ sg.Radio('a', 1, key='-R1-'), sg.Radio('b', 1, key='-R2-'), sg.Radio('c', 1, key='-R3-') ], [sg.Combo(['c1', 'c2', 'c3'], size=(6, 3), key='-COMBO-')], [sg.Output(size=(50, 6))], [ sg.Ok(), sg.Exit(), sg.Button('Enable'), sg.Button('Popout'), sg.Button('Debugger'), sg.Debug(key='Debug') ], ] window = sg.Window('This is your Application Window', layout, debugger_enabled=False) counter = 0 # Note that you can launch the debugger windows right away, without waiting for user input sg.show_debugger_popout_window() while True: # Your Event Loop event, values = window.read(timeout=100) if event in (None, 'Exit'): break