diff --git a/python/helpers/pydev/pydevd.py b/python/helpers/pydev/pydevd.py index 99e58a00bef1..b2d22bd317e0 100644 --- a/python/helpers/pydev/pydevd.py +++ b/python/helpers/pydev/pydevd.py @@ -380,13 +380,13 @@ class PyDB: return self.plugin def get_project_roots(self): - roots = os.getenv('PYCHARM_PROJECT_ROOTS', '').split(os.pathsep) - pydev_log.debug("PYCHARM_PROJECT_ROOTS %s\n" % roots) - return roots + if self.project_roots is None: + roots = os.getenv('IDE_PROJECT_ROOTS', '').split(os.pathsep) + pydev_log.debug("IDE_PROJECT_ROOTS %s\n" % roots) + self.project_roots = roots def not_in_scope(self, filename): - if self.project_roots is None: - return False + self.get_project_roots() filename = os.path.normcase(filename) for root in self.project_roots: root = os.path.normcase(root) @@ -1140,9 +1140,6 @@ class PyDB: else: exception, notify_always, notify_on_terminate, ignore_libraries = text, 0, 0, 0 - if int(ignore_libraries) > 0 and self.project_roots is None: - self.project_roots = self.get_project_roots() - if exception.find('-') != -1: type, exception = exception.split('-') else: @@ -1545,8 +1542,6 @@ class PyDB: #print('trace_dispatch', base, frame.f_lineno, event, frame.f_code.co_name, is_file_to_ignore) if is_file_to_ignore: if DONT_TRACE[base] == LIB_FILE: - if self.project_roots is None: - self.project_roots = self.get_project_roots() if self.not_in_scope(filename): return None else: diff --git a/python/helpers/pydev/pydevd_signature.py b/python/helpers/pydev/pydevd_signature.py index d7b37c84cb76..5967ab31786e 100644 --- a/python/helpers/pydev/pydevd_signature.py +++ b/python/helpers/pydev/pydevd_signature.py @@ -31,7 +31,7 @@ class Signature(object): class SignatureFactory(object): def __init__(self): self._caller_cache = {} - self.project_roots = os.getenv('PYCHARM_PROJECT_ROOTS', '').split(os.pathsep) + self.project_roots = os.getenv('IDE_PROJECT_ROOTS', '').split(os.pathsep) def is_in_scope(self, filename): filename = os.path.normcase(filename) diff --git a/python/src/com/jetbrains/python/debugger/PyDebugRunner.java b/python/src/com/jetbrains/python/debugger/PyDebugRunner.java index d0628db29c52..206916bdf36d 100644 --- a/python/src/com/jetbrains/python/debugger/PyDebugRunner.java +++ b/python/src/com/jetbrains/python/debugger/PyDebugRunner.java @@ -63,7 +63,7 @@ public class PyDebugRunner extends GenericProgramRunner { public static final String CLIENT_PARAM = "--client"; public static final String PORT_PARAM = "--port"; public static final String FILE_PARAM = "--file"; - public static final String PYCHARM_PROJECT_ROOTS = "PYCHARM_PROJECT_ROOTS"; + public static final String IDE_PROJECT_ROOTS = "IDE_PROJECT_ROOTS"; @SuppressWarnings("SpellCheckingInspection") public static final String GEVENT_SUPPORT = "GEVENT_SUPPORT"; @@ -249,6 +249,6 @@ public class PyDebugRunner extends GenericProgramRunner { roots.add(contentRoot.getPath()); } - commandLine.getEnvironment().put(PYCHARM_PROJECT_ROOTS, StringUtil.join(roots, File.pathSeparator)); + commandLine.getEnvironment().put(IDE_PROJECT_ROOTS, StringUtil.join(roots, File.pathSeparator)); } }