Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed bug in value_to_str for ELEMENT_TYPE_STRING

  • Loading branch information...
commit 4fa8915ecd1c176465dbe9d47b94da0f33f2d7c0 1 parent 3327835
@devhawk authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 ipydbg.py
View
15 ipydbg.py
@@ -182,18 +182,19 @@ def get_locals(frame, scope=None, offset = None, show_hidden_locals = False):
CorElementType.ELEMENT_TYPE_CHAR ]
def value_to_str(value):
+ rv = value.CastToReferenceValue()
+ if rv != None:
+ if rv.IsNull: return "<None>"
+ return value_to_str(rv.Dereference())
+ bv = value.CastToBoxValue()
+ if bv != None:
+ return value_to_str(rv.GetObject())
+
if value.Type in _generic_element_types:
return value.CastToGenericValue().GetValue().ToString()
elif value.Type == CorElementType.ELEMENT_TYPE_STRING:
return value.CastToStringValue().String
elif value.Type in [CorElementType.ELEMENT_TYPE_CLASS, CorElementType.ELEMENT_TYPE_VALUETYPE]:
- rv = value.CastToReferenceValue()
- if rv != None:
- if rv.IsNull: return "<None>"
- return value_to_str(rv.Dereference())
- bv = value.CastToBoxValue()
- if bv != None:
- return value_to_str(rv.GetObject())
return value.ExactType.Class.GetTypeInfo().FullName
else:
return "<printing value of type: %s not implemented>" % str(value.Type)
Please sign in to comment.
Something went wrong with that request. Please try again.