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))