Breakpoint2.FileLine 屬性
取得檔案中設有中斷點的行。
命名空間: EnvDTE80
組件: EnvDTE80 (在 EnvDTE80.dll 中)
語法
'宣告
ReadOnly Property FileLine As Integer
int FileLine { get; }
property int FileLine {
int get ();
}
abstract FileLine : int
function get FileLine () : int
屬性值
型別:System.Int32
包含設有中斷點之原始程式碼行號的整數。
備註
原始程式碼行號,從設有中斷點的函式開頭算起。 如果這項值為 1,中斷點會設定在檔案的開頭。 這個值是在 [新增中斷點、檔案] 對話方塊中的 [行] 方塊中加以指定。
範例
下列範例示範如何使用 FileLine 屬性。
若要測試這個屬性:
請在目標應用程式中設定中斷點。
執行增益集。
public static void FileLine(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("FileLine 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 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。