Share via


IDebugProperty2

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

This interface represents a stack frame property, a program document property, or some other property. The property is usually the result of an expression evaluation.

Note

This use of "property" should not be confused with that meaning a member variable of a class, although an IDebugProperty2 can represent such an entity.

Syntax

IDebugProperty2 : IUnknown

Notes for Implementers

The DE implements this interface to represent a particular kind of value. For example, the value could be a numerical value as a result of an expression evaluation, a memory context used for displaying memory, or a list of registers and their values.

Notes for Callers

Call EvaluateSync or EvaluateAsync to obtain this interface, which represents the result of an evaluation. IDebugExpression2::EvaluateAsync returns this interface by sending an IDebugExpressionEvaluationCompleteEvent2 interface to the SDM, which in turn calls GetResult to retrieve the property.

  • GetDebugProperty returns this interface to provide the associated script document.

  • GetReturnValue returns this interface to represent the return value of a function.

  • GetDebugProperty returns this interface to represent various properties of the program such as a name or a memory context.

  • GetDebugProperty returns this interface to represent various properties of the stack frame such as local variables.

Methods in Vtable Order

The following table shows the methods of IDebugProperty2.

Method Description
GetPropertyInfo Fills in a DEBUG_PROPERTY_INFO structure that describes a property.
SetValueAsString Sets the value of a property from a string.
SetValueAsReference Sets the value of the property from the value of a given reference.
EnumChildren Enumerates the children of a property.
GetParent Returns the parent of a property.
GetDerivedMostProperty Returns the property that describes the most-derived property of a property.
GetMemoryBytes Returns the memory bytes that compose the value of a property.
GetMemoryContext Returns the memory context for a property value.
GetSize Returns the size, in bytes, of the property value.
GetReference Returns a reference to this property's value.
GetExtendedInfo Returns the extended information of a property.

Remarks

A property, as represented by an IDebugProperty2 interface, can be thought of as a value with a name, a type, and an address. In more general terms, an IDebugProperty2 can represent anything that has a hierarchical structure, with parents and child nodes.

A property is usually transitory, lasting only as long as the current stack frame, for example. On the other hand, a reference, as represented by an IDebugReference2 interface, lasts as long as the value remains in memory.

The IDE can use the IDebugProperty2 interface to let users browse and modify properties at run time.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See also