Breakpoint.FunctionLineOffset 属性

指示距函数断点名称的行偏移量。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
ReadOnly Property FunctionLineOffset As Integer
int FunctionLineOffset { get; }
property int FunctionLineOffset {
    int get ();
}
abstract FunctionLineOffset : int with get
function get FunctionLineOffset () : int

属性值

类型:Int32
一个整数值,表示距函数断点名称的行偏移量。

备注

此属性可能无法在本机语言下正常使用,具体取决于引擎。

示例

下面的示例演示如何使用 FunctionLineOffset 属性。

测试此属性:

  1. 在目标应用程序中设置一个断点。

  2. 运行外接程序。

public static void FunctionLineOffset(DTE 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("FunctionLineOffset Property Test: ");
    owp.Activate();

    // dte is a reference to the DTE object passed to you by the
    // OnConnection method that you implement when you create an add-in.
    EnvDTE.Debugger debugger = (EnvDTE.Debugger)dte.Debugger;
    owp.OutputString("\n FunctionColumnOffset: " + 
                      debugger.Breakpoints.Item(1).FunctionColumnOffset.ToString());
    owp.OutputString("\n FunctionLineOffset: " + 
                      debugger.Breakpoints.Item(1).FunctionLineOffset.ToString());
}
Shared Sub FunctionLineOffset(ByRef dte As EnvDTE.DTE)
    MessageBox.Show("FunctionColumnOffset: " + _
                    dte.Debugger.Breakpoints.Item(1).FunctionColumnOffset.ToString())
    MessageBox.Show("FunctionLineOffset: " + _
                    dte.Debugger.Breakpoints.Item(1).FunctionLineOffset.ToString())
End Sub

.NET Framework 安全性

请参阅

参考

Breakpoint 接口

EnvDTE 命名空间