DebuggableAttribute 建構函式

定義

初始化 DebuggableAttribute 類別的新執行個體。

多載

DebuggableAttribute(DebuggableAttribute+DebuggingModes)

用指定的 Just-In-Time (JIT) 編譯器偵錯模式,初始化 DebuggableAttribute 類別的新執行個體。

DebuggableAttribute(Boolean, Boolean)

用指定的 Just-In-Time (JIT) 編譯器追蹤與最佳化選項,初始化 DebuggableAttribute 類別的新執行個體。

DebuggableAttribute(DebuggableAttribute+DebuggingModes)

來源:
DebuggableAttribute.cs
來源:
DebuggableAttribute.cs
來源:
DebuggableAttribute.cs

用指定的 Just-In-Time (JIT) 編譯器偵錯模式,初始化 DebuggableAttribute 類別的新執行個體。

public:
 DebuggableAttribute(System::Diagnostics::DebuggableAttribute::DebuggingModes modes);
public DebuggableAttribute (System.Diagnostics.DebuggableAttribute.DebuggingModes modes);
new System.Diagnostics.DebuggableAttribute : System.Diagnostics.DebuggableAttribute.DebuggingModes -> System.Diagnostics.DebuggableAttribute
Public Sub New (modes As DebuggableAttribute.DebuggingModes)

參數

modes
DebuggableAttribute.DebuggingModes

由各種 DebuggableAttribute.DebuggingModes 值經過逐一位元合併組成的結果,代表 JIT 編譯器的偵錯模式。

備註

DebuggableAttribute(DebuggableAttribute+DebuggingModes)使用 參數值Default呼叫建modes構函式相當於呼叫DebuggableAttribute(Boolean, Boolean)參數值為 的isJITTrackingEnabledtrue建構函式。

適用於

DebuggableAttribute(Boolean, Boolean)

來源:
DebuggableAttribute.cs
來源:
DebuggableAttribute.cs
來源:
DebuggableAttribute.cs

用指定的 Just-In-Time (JIT) 編譯器追蹤與最佳化選項,初始化 DebuggableAttribute 類別的新執行個體。

public:
 DebuggableAttribute(bool isJITTrackingEnabled, bool isJITOptimizerDisabled);
public DebuggableAttribute (bool isJITTrackingEnabled, bool isJITOptimizerDisabled);
new System.Diagnostics.DebuggableAttribute : bool * bool -> System.Diagnostics.DebuggableAttribute
Public Sub New (isJITTrackingEnabled As Boolean, isJITOptimizerDisabled As Boolean)

參數

isJITTrackingEnabled
Boolean

若要啟用偵錯,則為 true,否則為 false

isJITOptimizerDisabled
Boolean

若要停用執行的最佳化工具,則為 true,否則為 false

備註

這個建構函式會設定 屬性 IsJITTrackingEnabledIsJITOptimizerDisabled

的參數 isJITTrackingEnabledtrue 會導致運行時間在程式代碼產生期間追蹤調試程式的重要資訊;不追蹤會產生結果的值 false ,但不會防止偵錯。 此參數在 .NET Framework 2.0 版中沒有任何作用。 在 2.0 版 JIT 追蹤資訊中,一律會產生 Microsoft 中繼語言 (MSIL) 位移至方法內的機器碼位移。

的參數isJITOptimizerDisabledtrue值,會針對偵錯進行優化;針對執行優化的值false

適用於