From 80f8cf2cef6261bc2ddd73c0823776a069236da4 Mon Sep 17 00:00:00 2001 From: Elizaveta Shashkova Date: Thu, 22 Mar 2018 18:49:37 +0300 Subject: [PATCH] Attach debugger to Console shows Cython extensions warning (PY-28698) Update sys.path value to make extension's folder available during import --- python/helpers/pydev/_pydev_bundle/pydev_console_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/helpers/pydev/_pydev_bundle/pydev_console_utils.py b/python/helpers/pydev/_pydev_bundle/pydev_console_utils.py index 33751922f044..2928b0404e5a 100644 --- a/python/helpers/pydev/_pydev_bundle/pydev_console_utils.py +++ b/python/helpers/pydev/_pydev_bundle/pydev_console_utils.py @@ -578,8 +578,11 @@ class BaseInterpreterInterface: os.environ[env_name] = "%s%c%s" % (existing_value, os.path.pathsep, value) else: os.environ[env_name] = value + if env_name == "PYTHONPATH": + sys.path.append(value) del debugger_options[env_key] + def do_connect_to_debugger(): try: # Try to import the packages needed to attach the debugger