Skip to content

Commit c02affd

Browse files
committed
Skip importing sessions unless type checking
1 parent fddf0de commit c02affd

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/debugpy/adapter/components.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
# for license information.
44

55
import functools
6-
from typing import Type, TypeVar, Union, cast
6+
from typing import TYPE_CHECKING, Type, TypeVar, Union, cast
77

8-
from debugpy.adapter.sessions import Session
8+
if TYPE_CHECKING:
9+
# Dont import this during runtime. There's an order
10+
# of imports issue that causes the debugger to hang.
11+
from debugpy.adapter.sessions import Session
912
from debugpy.common import json, log, messaging, util
1013

1114

0 commit comments

Comments
 (0)