Click here to Skip to main content
13,558,821 members
Click here to Skip to main content
Add your own
alternative version


Posted 26 May 2011
Licenced CPOL

The Pain and Anguish of DTS Script Debugging

Rate this:
Please Sign up or sign in to vote.
When all else fails, fire off some events and bask in the glow of the IDE's Progress tab.
I recently had the misfortune of having to create a DTS package (in Visual Basic, to add insult to injury), and had a helluva time trying to find out what was happening in the code as it was running. The environment is a 2003 Server that I have to remote-in to, and then run the appropriate dev tool. The problems were many:

  • Setting breakpoints - when I tried to set a breakpoint and then run the task, I would get a dialog box saying that the debugger had encountered a problem and was shutting down. It is suspected that the fact that we have to remote-in is the culprit, but we don't have the ability to find out for sure, so setting breakpoints was not feasible.
  • Displaying message boxes - This was suggested by the guy that had previously been the maintainer of the scripts in question. While useful, it interrupted the program so many times that it became unwieldy. Fail.
  • Using Debug.WriteLine - this just plain doesn't work. Nothing is displayed in the output window as a result of Debug.WriteLine. Fail again.

At this point, I discovered the Progress tab in the IDE.

  • Using Console.WriteLine - this just plain doesn't work. Nothing is displayed in the Progress tab as a result of using Console.WriteLine. Fail again.

Finally, I found out about the DTS Events, FireProgress, FireInformation, FireWarning, and FireError methods. Using these methods is the answer when everything else fails for one reason or another. I simply call the apprpriate method, and I get output in the Progress window, allowing me to observe script execution without the nuisance of popup message windows (that actually stop script execution while they wait for user interaction).

Dts.Events.FireInformation(suitable parameters)

If you don't know what a DTS package is, google is your friend.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

John Simmons / outlaw programmer
Software Developer (Senior) Paddedwall Software
United States United States
I've been paid as a programmer since 1982 with experience in Pascal, and C++ (both self-taught), and began writing Windows programs in 1991 using Visual C++ and MFC. In the 2nd half of 2007, I started writing C# Windows Forms and ASP.Net applications, and have since done WPF, Silverlight, WCF, web services, and Windows services.

My weakest point is that my moments of clarity are too brief to hold a meaningful conversation that requires more than 30 seconds to complete. Thankfully, grunts of agreement are all that is required to conduct most discussions without committing to any particular belief system.

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.180515.1 | Last Updated 26 May 2011
Article Copyright 2011 by John Simmons / outlaw programmer
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid