Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated locals command to print "no locals found" when no locals are …

…found
  • Loading branch information...
commit 5b36df208da5e4e3d3f6a870af07fcba8c1b13fc 1 parent 71600dd
@devhawk authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 ipydbg.py
View
6 ipydbg.py
@@ -283,7 +283,9 @@ def _input(self):
print "\nLocals"
show_hidden = (k.Modifiers & ConsoleModifiers.Alt) == ConsoleModifiers.Alt
locals = get_locals(self.active_thread.ActiveFrame, show_hidden_locals = show_hidden)
+ count = 0
for name,value in ((name, extract_value(value)) for name, value in locals):
+ count = count + 1
with CC.Magenta: print " ", name,
if type(value) == CorObjectValue:
@@ -298,7 +300,9 @@ def _input(self):
else:
print value,
with CC.Green: print value.GetType().FullName
-
+ else:
+ if count == 0:
+ with CC.Magenta: print " No Locals Found"
elif k.Key == ConsoleKey.T:
print "\nStack Trace"
get_frames = get_dynamic_frames(self.active_thread.ActiveChain) \
Please sign in to comment.
Something went wrong with that request. Please try again.