Latest Development Copy
This commit is contained in:
@@ -9,12 +9,21 @@ from .libs.terminal import Terminal, ExitTerminal
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
_: argparse.Action = parser.add_argument("--debug", help="Debug the program", action="store_true")
|
||||
_: argparse.Action = parser.add_argument("--remote-debug", help="Enable remote debugging with pudb", action="store_true")
|
||||
_: argparse.Action = parser.add_argument("--debug-port", help="Port for remote debugging", type=int, default=6899)
|
||||
args = parser.parse_args()
|
||||
|
||||
config: Config = Config()
|
||||
# stdscr: curses.window = curses.initscr()
|
||||
def main(stdscr: curses.window) -> None:
|
||||
terminal: Terminal = Terminal(stdscr)
|
||||
if args.remote_debug:
|
||||
import os
|
||||
from pudb.remote import set_trace
|
||||
_term_size: os.terminal_size = os.get_terminal_size()
|
||||
# set_trace(term_size=(_term_size.columns, _term_size.lines), host='0.0.0.0', port=args.debug_port)
|
||||
terminal: Terminal = Terminal(stdscr, remote_debug=args.remote_debug, debug_port=args.debug_port)
|
||||
else:
|
||||
terminal: Terminal = Terminal(stdscr)
|
||||
Terminal.startup(terminal)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user