DtsContainer.DebugMode Property

Gets or sets a Boolean that indicates whether the DtsContainer object is in debug mode and whether it should fire the OnBreakpointHit event while running.

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

Syntax

'Declaration
Public Property DebugMode As Boolean
    Get
    Set
'Usage
Dim instance As DtsContainer
Dim value As Boolean

value = instance.DebugMode

instance.DebugMode = value
public bool DebugMode { get; set; }
public:
virtual property bool DebugMode {
    bool get () sealed;
    void set (bool value) sealed;
}
abstract DebugMode : bool with get, set
override DebugMode : bool with get, set
final function get DebugMode () : boolean
final function set DebugMode (value : boolean)

Property Value

Type: System.Boolean
true indicates that the object is in debug mode and fires the OnBreakpointHit event.

Implements

IDTSBreakpointSite.DebugMode

Remarks

The IsBreakpointTargetEnabled function is called each time the task encounters a breakpoint in its code. Because calling the function IsBreakpointTargetEnabled to see if the breakpoint target is enabled is expensive when called repeatedly, the DebugMode flag is overridden and used by each inheriting class to indicate if that executable is to be debugged. When this flag is set to false, the tasks can avoid the call to check for an enabled breakpoint. A value of true indicates that the task should check for enabled breakpoints, and is when the IsBreakpointTargetEnabled is checked.

Examples

The Package class implements the DtsContainer through its inheritance of the EventsProvider. The following code example creates a package, then displays and sets values inherited from 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

Sample Output:

CreationName: SSIS.Package.2

DebugMode: False

DelayValidation: True

Description:

Disable: False

Description after modification: This is the Execute Process Package Sample