Breakpoint2::FunctionName Property
Visual Studio 2015
Gets the name of the function containing the breakpoint.
Assembly: EnvDTE80 (in EnvDTE80.dll)
Implements
Breakpoint::FunctionNameThe 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); }
Show: