Breakpoint2.FunctionName Property
Gets the name of the function containing the breakpoint.
Namespace: EnvDTE80
Assembly: EnvDTE80 (in EnvDTE80.dll)
Syntax
'Declaration
ReadOnly Property FunctionName As String
'Usage
Dim instance As Breakpoint2
Dim value As String
value = instance.FunctionName
string FunctionName { get; }
property String^ FunctionName {
String^ get ();
}
function get FunctionName () : String
Property Value
Type: System.String
A string containing the function name.
Implements
Examples
The following example demonstrates how to use the FunctionName property.
To test this property:
Set a breakpoint in the target application.
Run the add-in.
public static void FunctionName (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("FunctionName property: ");
owp.Activate();
// dte is a reference to the DTE2 object passed to you by the
// OnConnection method that you implement when you create an Add-in.
EnvDTE80.Debugger2 debugger = (EnvDTE80.Debugger2)dte.Debugger;
owp.OutputString("Breakpoint in the file " + debugger.Breakpoints.Item(1).File);
owp.OutputString(" on line " +
debugger.Breakpoints.Item(1).FileLine.ToString() + " column ");
owp.OutputString(debugger.Breakpoints.Item(1).FileColumn.ToString() + " is ");
owp.OutputString(debugger.Breakpoints.Item(1).Enabled ? "enabled." : "disabled.");
owp.OutputString("\nThis breakpoint is in the function: " +
debugger.Breakpoints.Item(1).FunctionName);
}
.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.
See Also
Reference
Other Resources
How to: Compile and Run the Automation Object Model Code Examples