From 5b27a35c6e90663a038ecc657d95568078c22c34 Mon Sep 17 00:00:00 2001 From: Fabio Zadrozny Date: Fri, 18 Nov 2022 09:57:22 -0300 Subject: [PATCH] Some of the roots can be None in WASM builds --- src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py index 67fd6cfde..d5f0d5667 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py @@ -190,6 +190,8 @@ def _get_default_library_roots(cls): if os.path.exists(path) and os.path.basename(path) in ('site-packages', 'pip-global'): roots.append(path) + # On WASM some of the roots may not exist, filter those out. + roots = [path for path in roots if path is not None] roots.extend([os.path.realpath(path) for path in roots]) return sorted(set(roots))