Debugging a script component task???

How to debug a Script Component task

For instance, I’ve got a Input0_ProcessInputRow procedure and I’d like to see what happen when compiler reach this line:

dFecha = Left(Row.Column19, 4) & "-" & Mid(Row.Column19, 5, 2) & "-" & Right(Row.Column19, 2)

I’ve 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


Answer this question

Debugging a script component task???

  • Spider.Eg

    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



  • Jojy

    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



  • krinpit

    Try firing OnInformation events containing the information that you are interested in.

    -Jamie



  • yadav.shivam

    Correct. Message box only works in script task as well.

    -Jamie



  • brohans

    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



  • Miljac

    So that, as you said we are totally stuck. I'll use variables in order to see anything

    seeya



  • BigPaul

    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



  • thomsson

    are you talking about Event Handlers tab and then choose Data Flow task and to capture oninformation event and do some stuff there

    thanx



  • Steve DeBow

    msgbox.Show(string) does not work... But msgbox(string) should work...
  • Batmannnn

    hi TGnat,

    you're right, that works. Thanks a lot I hadn't though it



  • Hrcko

    Unfortunately you can't debug script components with breakpoints as you can in the script task.

    Your best option is to fire 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



  • artzoop

    Thanks for everything!

  • Debugging a script component task???