Freigeben über


Breakpoint2.FunctionName Property

Definition

Gets the name of the function containing the breakpoint.

public:
 property System::String ^ FunctionName { System::String ^ get(); };
public:
 property Platform::String ^ FunctionName { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(102)]
public string FunctionName { [System.Runtime.InteropServices.DispId(102)] get; }
[<System.Runtime.InteropServices.DispId(102)>]
[<get: System.Runtime.InteropServices.DispId(102)>]
member this.FunctionName : string
Public ReadOnly Property FunctionName As String

Property Value

A string containing the function name.

Implements

Attributes

Examples

The following example demonstrates how to use the FunctionName property.

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();  

    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);  
}  

Applies to