Debugger2::HexInputMode Property

 

Gets or sets a value indicating whether the expressions are evaluated in hexadecimal or decimal format.

Namespace:   EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

property bool HexInputMode {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

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

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

See Expressions in the Debugger for more information.

The following example demonstrates how to use the HexInputMode property.

public static void HexInputMode(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 Input Mode 
    Test");
    owp.Activate();

    EnvDTE80.Debugger2 debugger = (EnvDTE80.Debugger2)dte.Debugger;

    debugger.HexInputMode = false;
    debugger.HexDisplayMode = true;
    EnvDTE.Expression exp = debugger.GetExpression("length", true, 1);
    owp.OutputString("Value of variable length in hex: " + exp.Value);

    debugger.HexInputMode = true;
    debugger.HexDisplayMode = false;
    exp = debugger.GetExpression("length", true, 1);
    owp.OutputString("\nValue of variable length in decimal: " + 
    exp.Value);
}
Return to top
Show: