Debugging a script component task???
How to debug a Script Component task? For instance, Ive got a Input0_ProcessInputRow procedure and Id like to see what happen when compiler reach this line: dFecha = Left(Row.Column19, 4) & "-" & Mid(Row.Column19, 5, 2) & "-" & Right(Row.Column19, 2) Ive put a toogle breakpoint there and then saved but when I run the package to ignore at all. This topic has been already discussed in these newsgrups but I still have doubts. Thanks a lot for any advice or clarification
June 15th, 2006 12:36pm

Unfortunately you can't debug script components with breakpoints as you can in the script task. Your best option is tofire events from within the script component that output teh values that you are interested in. Not great but for now its what we're stuck with I'm afraid. -Jamie
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2006 12:46pm

Thanks Jamie. Anyway, I tried to allocate a MessageBox.Show... method but it did not work.... According to DarrenSqlis you can do that with Script Task no with Script Component task
June 15th, 2006 12:54pm

Correct. Message box only works in script task as well. -Jamie
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2006 12:57pm

So that, as you saidwe are totally stuck. I'll use variables in order to see anything seeya
June 15th, 2006 1:01pm

Try firing OnInformation events containing the information that you are interested in. -Jamie
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2006 1:03pm

are you talking about Event Handlers tab and then choose Data Flow task and to capture oninformation event and do some stuff there? thanx
June 15th, 2006 1:07pm

You can fire events from within the script component that will then be caught by the eventhandlers. Here's some code that would output the value of a variable: ComponentMetaData.FireInformation(1, "MyScriptComponent", "VariableName=" + CStr(Me.Variables.VariableName), "", 0, True) You can change it to output whatever you like. Once the eventhandler catches the fired event then you can do whatever you like with the value. -Jamie
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2006 1:18pm

hi again, I suppose that 'MyScripComponent' is equal to the name of my script, in my case "ScriptMain", isn't it? Or maybe the name of my Data Flow component?? Where you put VariableName are you referring a variable defined in my package. thanks a lot
June 15th, 2006 1:28pm

You can put whatever you like for most of the parameters. Where it says "MyScriptComponent" you can even leave that blank if you want. The important bit is what you are outputting in the "Description" parameter. And yes, VariableName is a variable defined in your package and referenced in ReadWritevariables. It doesn't have to be a variable though - that was just an example. You can output whatever you like (e.g. a value in your incoming row or a calculated value) Just go into your script component and type: "Componentmetadata.FireInformation(" and let intellisense help you from there. -Jamie
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2006 1:36pm

Thanks for everything!
June 15th, 2006 1:44pm

msgbox.Show(string) does not work... But msgbox(string) should work...
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2006 4:45pm

hi TGnat, you're right, that works. Thanks a lot I hadn't though it
June 15th, 2006 5:04pm

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:56pm

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

Other recent topics Other recent topics