Breakpoint2 介面

包含屬性和方法,它們可用來以程式設計方式管理中斷點。

命名空間:  EnvDTE80
組件:  EnvDTE80 (在 EnvDTE80.dll 中)

語法

'宣告
<GuidAttribute("FBC8D85A-E449-4CB3-B026-F7808DEB7792")> _
Public Interface Breakpoint2 _
    Inherits Breakpoint
[GuidAttribute("FBC8D85A-E449-4CB3-B026-F7808DEB7792")]
public interface Breakpoint2 : Breakpoint
[GuidAttribute(L"FBC8D85A-E449-4CB3-B026-F7808DEB7792")]
public interface class Breakpoint2 : Breakpoint
[<GuidAttribute("FBC8D85A-E449-4CB3-B026-F7808DEB7792")>]
type Breakpoint2 =  
    interface
        interface Breakpoint
    end
public interface Breakpoint2 extends Breakpoint

Breakpoint2 型別會公開下列成員。

屬性

  名稱 說明
公用屬性 BreakWhenHit 取得或設定值,指出遇到中斷點時,程式是否要中斷。
公用屬性 Children (繼承自 Breakpoint)。
公用屬性 Children 取得所有 Breakpoint2 子物件的集合。
公用屬性 Collection (繼承自 Breakpoint)。
公用屬性 Collection 取得包含所有 Breakpoint2 物件的集合。
公用屬性 Condition (繼承自 Breakpoint)。
公用屬性 Condition 取得觸發 (Trigger) 中斷點的條件。
公用屬性 ConditionType (繼承自 Breakpoint)。
公用屬性 ConditionType 取得中斷點的條件類型,為 true 時中斷,或是變更時中斷。
公用屬性 CurrentHits (繼承自 Breakpoint)。
公用屬性 CurrentHits 取得此偵錯工作階段中,這個中斷點被叫用的次數。
公用屬性 DTE (繼承自 Breakpoint)。
公用屬性 DTE 取得最上層的擴充性物件。
公用屬性 Enabled (繼承自 Breakpoint)。
公用屬性 Enabled 設定或傳回這個中斷點的啟用狀態。
公用屬性 File (繼承自 Breakpoint)。
公用屬性 File 取得含有中斷點的檔案名稱。
公用屬性 FileColumn (繼承自 Breakpoint)。
公用屬性 FileColumn 取得字元位置,這個位置位於設有中斷點之檔案裡的某一行內。
公用屬性 FileLine (繼承自 Breakpoint)。
公用屬性 FileLine 取得檔案中設有中斷點的行。
公用屬性 FilterBy 取得或設定條件,此條件設有中斷點。
公用屬性 FunctionColumnOffset (繼承自 Breakpoint)。
公用屬性 FunctionColumnOffset 取得來自函式中斷點名稱的欄位移。
公用屬性 FunctionLineOffset (繼承自 Breakpoint)。
公用屬性 FunctionLineOffset 取得來自函式中斷點名稱的行位移。
公用屬性 FunctionName (繼承自 Breakpoint)。
公用屬性 FunctionName 取得含有中斷點的函式名稱。
公用屬性 HitCountTarget (繼承自 Breakpoint)。
公用屬性 HitCountTarget 取得任何中斷點類型的叫用次數 (Hit Count) 目標。它是根據叫用次數類型而解譯的。
公用屬性 HitCountType (繼承自 Breakpoint)。
公用屬性 HitCountType 取得叫用次數類型,其描述如何解譯叫用次數。
公用屬性 Language (繼承自 Breakpoint)。
公用屬性 Language 取得含有中斷點的程式語言名稱。
公用屬性 LocationType (繼承自 Breakpoint)。
公用屬性 LocationType 取得中斷點所表示的位置類型。
公用屬性 Macro 取得或設定中斷點巨集。
公用屬性 Message 取得或設定中斷點訊息。
公用屬性 Name (繼承自 Breakpoint)。
公用屬性 Name 設定或傳回中斷點名稱。
公用屬性 Parent (繼承自 Breakpoint)。
公用屬性 Parent 取得中斷點的直接上層父物件。
公用屬性 Process 取得與目前中斷點相關的 Process2
公用屬性 Program (繼承自 Breakpoint)。
公用屬性 Program 取得此處理序管理的可執行檔。
公用屬性 Tag (繼承自 Breakpoint)。
公用屬性 Tag 設定或取得用以辨識中斷點的使用者定義字串。
公用屬性 Type (繼承自 Breakpoint)。
公用屬性 Type 取得常數,指定中斷點的類型。

回頁首

方法

  名稱 說明
公用方法 Delete() (繼承自 Breakpoint)。
公用方法 Delete() 刪除中斷點。
公用方法 ResetHitCount() (繼承自 Breakpoint)。
公用方法 ResetHitCount() 重設中斷點叫用次數。

回頁首

範例

下列程式碼會示範如何在 Breakpoint2 物件上使用 Children 屬性。

若要測試這個屬性:

  1. 在目標應用程式中設定中斷點。

  2. 執行增益集。

    中斷點的子系個數為零。

  3. 在偵錯模式執行目標應用程式。

  4. 當程式在中斷點上停止時,請執行增益集。

    子系個數為零。

public static void Children(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("Children Property 
Test");
    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("Number of children: " + 
debugger.Breakpoints.Item(1).Children.Count.ToString());
}

請參閱

參考

EnvDTE80 命名空間

其他資源

Automation 物件模型圖表