title: Debugging SSIS vb.net Script
body: <p>I am debugging a SSIS vb.net script in a Visual Studio 2005 SSIS project.</p>
  
  <p>Is there a way to execute just the script without having to start in my control flow?  Otherwise I have to work through my other steps and drill down through my Script Task into the Editor into the actual script.</p>
  
  <p>As a side not my script is pretty simple, it just creates a directory if a directory with today's date is not found. </p>
  
  <pre><code>Imports System
  Imports System.IO
  Imports Microsoft.VisualBasic
  Imports System.Data
  Imports System.Math
  Imports Microsoft.SqlServer.Dts.Runtime
  
  Public Class ScriptMain
  
      ' Checks to see if todays folder exists on sqlzdocs -&gt;  if it doesnt it creates it.  Else it errors
  
      Public Sub Main()
  
          Dim todaysdate As String = String.Format("{0:yyyyMMdd}", DateTime.Now)
          Dim di As IO.DirectoryInfo = New IO.DirectoryInfo("\\MyServer\Path\Current\" + todaysdate )
  
          If di.Exists = True Then
              Dts.Variables("User::FolderExists").Value = True
          Else
              Try
                  Dim createdirectory As IO.DirectoryInfo = Directory.CreateDirectory(di.ToString)
              Catch ex As Exception
                  Dts.Variables("User::Errors").Value = "Could not create the directory:" + di.ToString
                  Dts.Variables("User::FolderExists").Value = False
              End Try
  
          End If
  
          Dts.TaskResult = Dts.Results.Success
  
      End Sub
  
  End Class
  </code></pre>