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)