From 1fa5275e7f86849ad9561bf1638f560a294cf94e Mon Sep 17 00:00:00 2001 From: Quentin Peter Date: Mon, 11 Sep 2023 13:09:41 +0200 Subject: [PATCH] fix index --- spyder_kernels/customize/spyderpdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spyder_kernels/customize/spyderpdb.py b/spyder_kernels/customize/spyderpdb.py index b9d76f63..0d26986d 100755 --- a/spyder_kernels/customize/spyderpdb.py +++ b/spyder_kernels/customize/spyderpdb.py @@ -861,7 +861,7 @@ def get_pdb_state(self): hidden = self.hidden_frames(self.stack) pdb_stack = [f for f, h in zip(pdb_stack, hidden) if not h] # Adjust the index - pdb_index -= sum(hidden[:pdb_index]) + pdb_index -= sum([bool(i) for i in hidden[:pdb_index]]) state['stack'] = (pdb_stack, pdb_index)