Skip to content

Commit

Permalink
Fix debugging in Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Jun 22, 2018
1 parent f31673c commit a526206
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions spyder_kernels/console/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,13 @@ def _set_spyder_breakpoints(self, breakpoints):
"""Set all Spyder breakpoints in an active pdb session"""
if not self._pdb_obj:
return
# Breakpoints come serialized from Spyder
breakpoints = pickle.loads(breakpoints)

# Breakpoints come serialized from Spyder. We send them
# in a list of one element to be able to send them at all
# in Python 2
serialized_breakpoints = breakpoints[0]
breakpoints = pickle.loads(serialized_breakpoints)

self._pdb_obj.set_spyder_breakpoints(breakpoints)

def _ask_spyder_for_breakpoints(self):
Expand Down

0 comments on commit a526206

Please sign in to comment.