Freigeben über


Debugger3.HexDisplayMode Property

Definition

Gets or sets a value that indicates whether the expressions are output in hexadecimal or decimal format.

public:
 property bool HexDisplayMode { bool get(); void set(bool value); };
public:
 property bool HexDisplayMode { bool get(); void set(bool value); };
[System.Runtime.InteropServices.DispId(107)]
public bool HexDisplayMode { [System.Runtime.InteropServices.DispId(107)] get; [System.Runtime.InteropServices.DispId(107)] set; }
[<System.Runtime.InteropServices.DispId(107)>]
[<get: System.Runtime.InteropServices.DispId(107)>]
[<set: System.Runtime.InteropServices.DispId(107)>]
member this.HexDisplayMode : bool with get, set
Public Property HexDisplayMode As Boolean

Property Value

A Boolean that is true if hexadecimal format; otherwise, false.

Implements

Attributes

Examples

The following example shows how to use the HexDisplayMode property.

public static void HexDisplayMode(EnvDTE80.DTE2 dte)  
{  
    // Setup debug Output window.  
    Window w =   
    (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);  
    w.Visible = true;  
    OutputWindow ow = (OutputWindow)w.Object;  
    OutputWindowPane owp = ow.OutputWindowPanes.Add("Hex Display Mode   
    Test");  
    owp.Activate();  

    EnvDTE90.Debugger3 debugger = (EnvDTE90.Debugger3)dte.Debugger;  
    debugger.HexDisplayMode = false;  
    EnvDTE.Expression exp = debugger.GetExpression("length", true, 1);  
    owp.OutputString("Value of variable length in decimal: " +   
    exp.Value);  

    debugger.HexDisplayMode = true;  
    exp = debugger.GetExpression("length", true, 1);  
    owp.OutputString("\nValue of variable length in hex: " +   
    exp.Value);  
}  
Sub ShowEAX()  
    Dim ow As OutputWindow  
    ow = DTE2.Windows.Item(Constants.vsWindowKindOutput).Object  
    Dim exp As Expression  

    DTE2.Debugger.HexDisplayMode = False  
    exp = DTE2.Debugger.GetExpression("eax")  
    ow.ActivePane.OutputString(exp.Value + ", ")  

    DTE2.Debugger.HexDisplayMode = True  
    exp = DTE2.Debugger.GetExpression("eax")  
    ow.ActivePane.OutputString(exp.Value + vbCrLf)  
End Sub  

Remarks

Use this property to determine or set whether expressions are output in hexadecimal or decimal format. It directly corresponds to the setting in the General, Debugging, Options dialog box.

For more information, see Expressions in the Debugger.

Applies to