Debugger.HexInputMode Property
Gets or sets whether expressions are evaluated in hexadecimal or decimal format.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
Property HexInputMode As Boolean
bool HexInputMode { get; set; }
property bool HexInputMode {
bool get ();
void set (bool value);
}
abstract HexInputMode : bool with get, set
function get HexInputMode () : boolean
function set HexInputMode (value : boolean)
Property Value
Type: System.Boolean
true if hexadecimal format, otherwise false.
Remarks
Use HexInputMode to determine or set whether expressions are evaluated in hexadecimal or decimal format. HexInputMode directly corresponds to the setting in the General, Debugging, Options Dialog Box.
See Expressions in the Debugger for more information.
Examples
The following example demonstrates how to use the HexInputMode property.
To test this property:
Set a breakpoint in the target application.
Run the target application in the debug mode.
When the application stops at the breakpoint, run the add-in.
public static void HexInputMode(DTE dte)
{
// Setup the 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();
dte.Debugger.HexInputMode = false;
dte.Debugger.HexDisplayMode = true;
EnvDTE.Expression exp = dte.Debugger.GetExpression("length", true, 1);
owp.OutputString("Value of variable length in hex: " + exp.Value);
dte.Debugger.HexInputMode = true;
dte.Debugger.HexDisplayMode = false;
exp = dte.Debugger.GetExpression("length", true, 1);
owp.OutputString("\nValue of variable length in decimal: " + exp.Value);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.