How to debug a script component task???
Hi all of you, How to debug a scriptcomponent task made in .Net? I've got a Inmediate Window, Start Without Debugging, Toggle Breakpoint, etc but nothing works. When I press Start nothing happens. I suppose that anything very very of paramount importance I'm forgetting but I haven't any clue TIA
May 23rd, 2006 6:13pm

You cannot debug the stock script component, only the task allows this. For custom components you wrote from scratch you attach the debugger to DtsDebugHost.exe, to debug packages running in BIDS. I actually prefer setting the Project properties debug options. Point it to dtexec and give it some parameters to load a packge. Then just run. Saves the manual attach if you are doing a lot of runtime debugging.
Free Windows Admin Tool Kit Click here and download it now
May 23rd, 2006 6:26pm

So it's useless all the features on the bars when you have a script component? You are saying that is possible to debug a Script Task but I don't see how. Could you please be more explicit? I've got a Script task with a couple of lines. In any case Script editor from Script Component and Scrip task seems the same. Thanks a lot,
May 23rd, 2006 7:27pm

To debug the Script Task, open the task UI and click through to the script itself. (This is the VSA designer.) Now just add a breakpoint on a line of code. Close down VSA and the task UI. Run the package. When the breakpoint is hit, VSA will open up allowing you to step through the code. One limitation for the above is that it does not work for Script Tasks hosted in event handlers.
Free Windows Admin Tool Kit Click here and download it now
May 23rd, 2006 7:42pm

Hi, I am trying to debug a script task by setting a break point. It all looks good, the red dot appears in the script task box. But when I run the code, I get the message box saying the following: "SQL Server Integration Services Script Task has encountered a problem and needs to close. We are sorry for the inconvenience. If you were in the middle of something, the information you were working on might be lost." It gives to buttons - Debug and Close. What is going on? This renders ScriptTasks absolutely useless for me. I am running Windows Server 2003 Standard Edition SP1, Visual Studio 2005 8.0.50727.42. Would appreciate any help on this issue.
July 11th, 2006 3:30am

I have two more problems with the script tasks: 1. I am writing and saving the script, but as soon as I close the development environment and reopen it, and try to view the script task code, all my code is gone! It shows me the original generated file again. It seems that the only way to get to the code is to double-click the task, click on Script and then on Design Script. It looks like a bug in IS Studio, and this is extremely frustrating. Is there a workaround? 2. I set the flow of my package to be something like that: First task - copy file Second task - script task (processes the file. That is the one that doesn't seem to execute, and debugging it produces the message in the previous post) Third task - execute a stored proc Fourth task - execute data flow When I run my package and look at the execution results, I see that this order is not preserved (although I have made sure all the arrows connect the tasks in the right sequence). What I see is the copy file task comes first, then stored proc task, then data flow task. The script task is always last, even though it is second in my flow. There are no errors reported! Does the nature of the code that my script task does has any impact? I am reading one file and writing to another. Thansks for any help.
Free Windows Admin Tool Kit Click here and download it now
July 11th, 2006 10:56pm

arktseytlin wrote: Hi, I am trying to debug a script task by setting a break point. It all looks good, the red dot appears in the script task box. But when I run the code, I get the message box saying the following: "SQL Server Integration Services Script Task has encountered a problem and needs to close. We are sorry for the inconvenience. If you were in the middle of something, the information you were working on might be lost." It gives to buttons - Debug and Close. What is going on? This renders ScriptTasks absolutely useless for me. I am running Windows Server 2003 Standard Edition SP1, Visual Studio 2005 8.0.50727.42. Would appreciate any help on this issue. Strange. perhaps you could share your code??? -Jamie
July 12th, 2006 2:36am

arktseytlin wrote: I have two more problems with the script tasks: 1. I am writing and saving the script, but as soon as I close the development environment and reopen it, and try to view the script task code, all my code is gone! It shows me the original generated file again. It seems that the only way to get to the code is to double-click the task, click on Script and then on Design Script. It looks like a bug in IS Studio, and this is extremely frustrating. Is there a workaround? Not quite understanding this. You are correct that the only way to get to the code is via the "Design Script..." button. That is by design. What different steps are you following when you say "I am writing and saving the script, but as soon as I close the development environment and reopen it, and try to view the script task code, all my code is gone"? arktseytlin wrote: 2. I set the flow of my package to be something like that: First task - copy file Second task - script task (processes the file. That is the one that doesn't seem to execute, and debugging it produces the message in the previous post) Third task - execute a stored proc Fourth task - execute data flow When I run my package and look at the execution results, I see that this order is not preserved (although I have made sure all the arrows connect the tasks in the right sequence). What I see is the copy file task comes first, then stored proc task, then data flow task. The script task is always last, even though it is second in my flow. There are no errors reported! Strange again. I presume that you are using precedence constraints? How are you determining that they are executing in te wrong order? By the order in which they go yellow/green, via the execution results tab, or viaa log file? arktseytlin wrote: Does the nature of the code that my script task does has any impact? I am reading one file and writing to another. It shouldn't do. there's something stranger at work here. I'm sure there is a reasonable explanation though. -Jamie
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2006 2:41am

I am having exactly the same problem. Has anyone found out what the issue is. Just downloaded and installed sp1 for Team Suite as I have VS2005 Teamsuite installed, and I still can't debug my SSIS packages. If I put any break points in the Script code when I try to debug I get the message."SQL Server Integration Services Script Task has encountered a problem and needs to close. We are sorry for the inconvenience."I click on close and it runs the package but doesn't stop at any break point. If I take out all break points it will run without this error. A couple of times I have managed to put in a single break point early in the package within a different script component which causes it to break... but at a completely different point within a completely different script component. It's so weird. Any help would be appreciated.Hoots.
July 4th, 2007 6:26pm

The Script Component does not support the use of breakpoints. Therefore, you cannot step through your code and examine values as the package runs. There are a few workarounds to still get some form of debugging: http://microsoft-ssis.blogspot.com/2011/04/breakpoint-does-not-work-within-ssis.htmlPlease mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
April 5th, 2011 3:53pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics