Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Fix debugging in Python 2 #4

Merged
merged 1 commit into from
Jun 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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