From 697a7b26a5980af9d24b0655f7f78bd586a8ff46 Mon Sep 17 00:00:00 2001 From: Pavel Minaev Date: Tue, 12 Mar 2024 14:27:16 -0700 Subject: [PATCH] Fix step-out. --- src/debugpy/server/tracing/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/debugpy/server/tracing/__init__.py b/src/debugpy/server/tracing/__init__.py index 4114a67d..94c18197 100644 --- a/src/debugpy/server/tracing/__init__.py +++ b/src/debugpy/server/tracing/__init__.py @@ -379,7 +379,8 @@ class Step: break return is_complete elif self.step == "out": - while python_frame is not None: + is_complete = True + for python_frame, _ in traceback.walk_stack(python_frame): if python_frame is self.origin: is_complete = False break