From 2c1b0b3643051743366eaeb60bd820460b139f54 Mon Sep 17 00:00:00 2001 From: Roland Dobai Date: Thu, 10 Nov 2022 17:06:44 +0100 Subject: [PATCH] Tools: gdbgui is not supported on Python 3.11 Closes https://github.com/espressif/esp-idf/issues/10116 --- tools/idf_py_actions/debug_ext.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/idf_py_actions/debug_ext.py b/tools/idf_py_actions/debug_ext.py index 53bdfb3d36..0e0e2aecf0 100644 --- a/tools/idf_py_actions/debug_ext.py +++ b/tools/idf_py_actions/debug_ext.py @@ -230,8 +230,12 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict: env['PURE_PYTHON'] = '1' try: process = subprocess.Popen(args, stdout=gdbgui_out, stderr=subprocess.STDOUT, bufsize=1, env=env) - except Exception as e: + except (OSError, subprocess.CalledProcessError) as e: print(e) + if sys.version_info[:2] >= (3, 11): + raise SystemExit('Unfortunately, gdbgui is supported only with Python 3.10 or older. ' + 'See: https://github.com/espressif/esp-idf/issues/10116. ' + 'Please use "idf.py gdb" or debug in Eclipse/Vscode instead.') raise FatalError('Error starting gdbgui. Please make sure gdbgui has been installed with ' '"install.{sh,bat,ps1,fish} --enable-gdbgui" and can be started.', ctx)