If pydevd deps cannot be imported, add itself to the PYTHONPATH. debugpy:542
@@ -17,6 +17,12 @@ import traceback
import weakref
import getpass as getpass_mod
import functools
+try:
+ import pydevd_file_utils
+except ImportError:
+ # On the first import of a pydevd module, add pydevd itself to the PYTHONPATH
+ # if its dependencies cannot be imported.
+ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import pydevd_file_utils
from _pydev_bundle import pydev_imports, pydev_log
