DtsContainer.DebugMode 속성

정의

개체가 디버그 모드에 있는지 여부 DtsContainer 와 실행하는 동안 이벤트를 발생 OnBreakpointHit(IDTSBreakpointSite, BreakpointTarget) 시켜야 하는지 여부를 나타내는 부울 값을 가져오거나 설정합니다.

public:
 property bool DebugMode { bool get(); void set(bool value); };
public bool DebugMode { get; set; }
member this.DebugMode : bool with get, set
Public Property DebugMode As Boolean

속성 값

true는 개체가 디버그 모드에 있으며 이벤트를 발생시키는 것을 OnBreakpointHit(IDTSBreakpointSite, BreakpointTarget) 나타냅니다.

구현

예제

클래스는 Package .의 상속을 DtsContainer 통해 구현합니다 EventsProvider. 다음 코드 예제에서는 패키지를 만든 다음 상속된 DtsContainer값을 표시하고 설정합니다.

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace Microsoft.SqlServer.SSIS.Samples  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            // The package is the ExecuteProcess package sample   
            // that is installed with the SSIS samples.  
            string pkg = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";  

            Application app = new Application();  
            Package p1 = app.LoadPackage(pkg, null);  

            // Show the properties inherited from DtsContainer.  
            Console.WriteLine("CreationName:    {0}", p1.CreationName);  
            Console.WriteLine("DebugMode:       {0}", p1.DebugMode);  
            Console.WriteLine("DelayValidation: {0}", p1.DelayValidation);  
            Console.WriteLine("Description:     {0}", p1.Description);  
            Console.WriteLine("Disable:         {0}", p1.Disable);  

            // Description is not set for this sample, so set it.  
            p1.Description = "This is the Execute Process Package Sample";  
            Console.WriteLine("Description after modification: {0}", p1.Description);  

            Console.WriteLine();  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace Microsoft.SqlServer.SSIS.Samples  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            ' The package is the ExecuteProcess package sample   
            ' that is installed with the SSIS samples.  
            Dim pkg As String =  "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx"   

            Dim app As Application =  New Application()   
            Dim p1 As Package =  app.LoadPackage(pkg,Nothing)   

            ' Show the properties inherited from DtsContainer.  
            Console.WriteLine("CreationName:    {0}", p1.CreationName)  
            Console.WriteLine("DebugMode:       {0}", p1.DebugMode)  
            Console.WriteLine("DelayValidation: {0}", p1.DelayValidation)  
            Console.WriteLine("Description:     {0}", p1.Description)  
            Console.WriteLine("Disable:         {0}", p1.Disable)  

            ' Description is not set for this sample, so set it.  
            p1.Description = "This is the Execute Process Package Sample"  
            Console.WriteLine("Description after modification: {0}", p1.Description)  

            Console.WriteLine()  
        End Sub  
    End Class  
End Namespace  

샘플 출력:

CreationName: MSDTS. Package.1

DebugMode: False

DelayValidation: True

설명:

사용 안 함: False

수정 후 설명: 프로세스 패키지 실행 샘플입니다.

설명

IsBreakpointTargetEnabled 함수는 태스크가 코드에서 중단점을 발견할 때마다 호출됩니다. 반복적으로 호출할 때 중단점 대상이 사용되는지 확인하기 위해 함수 IsBreakpointTargetEnabled 를 호출하는 것은 비용이 많이 들기 때문에 플래그가 재정의 DebugMode 되고 각 상속 클래스에서 해당 실행 파일을 디버그할지 여부를 나타내는 데 사용됩니다. 이 플래그를 false설정하면 작업에서 사용 중단점을 확인하기 위한 호출을 방지할 수 있습니다. 값 true 은 태스크가 활성화된 중단점을 확인해야 하며 해당 중단점을 확인할 때 IsBreakpointTargetEnabled 임을 나타냅니다.

적용 대상