Skip to content

Commit

Permalink
Merge pull request #5528 from dalthviz/fixes_issue_5036
Browse files Browse the repository at this point in the history
PR: Add validation to not publish pdb_state after gettings values of variables
  • Loading branch information
ccordoba12 authored Oct 26, 2017
2 parents 26ac568 + 7ba948f commit 4d28de6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spyder/utils/ipython/spyder_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def __init__(self, *args, **kwargs):
self.namespace_view_settings = {}
self._pdb_obj = None
self._pdb_step = None
self._do_publish_pdb_state = True

kernel_config = self.config.get('IPKernelApp', None)
if kernel_config is not None:
Expand Down Expand Up @@ -157,6 +158,7 @@ def get_value(self, name):
# petitions to display a value
value = None
publish_data({'__spy_data__': value})
self._do_publish_pdb_state = False

def set_value(self, name, value):
"""Set the value of a variable"""
Expand Down Expand Up @@ -212,11 +214,12 @@ def publish_pdb_state(self):
Publish Variable Explorer state and Pdb step through
publish_data.
"""
if self._pdb_obj:
if self._pdb_obj and self._do_publish_pdb_state:
state = dict(namespace_view = self.get_namespace_view(),
var_properties = self.get_var_properties(),
step = self._pdb_step)
publish_data({'__spy_pdb_state__': state})
self._do_publish_pdb_state = True

def pdb_continue(self):
"""
Expand Down

0 comments on commit 4d28de6

Please sign in to comment.