I'm having trouble with my configurations. All of my configurations are targeting variables and the various properties are all set to expressions containing the targeted variables. I would like (during debugging) to dump out all of the variables.
Is there a way to access all variables from a script task? It looks like you have to enumerate the variables you want in the ReadOnlyVariables or ReadWriteVariables properties. I'd rather not miss one by forgetting to list it.
No, because there is no way of discovering what variables are available at run-time, and the locking mechanism to get access to the variable and it's value requires a name.
This type of funtionality is only available through the design-time UI interfaces.
|||You might be able to use the OnVariableValueChanged event to capture the variable values as they are set. You do need to make sure that RaiseChangedEvent is true for each variable.|||Thanks, but the reason for this was to help me understand the details of how the configuration was working. Will OnVariableValueChanged work even if the change was due to loading a configuration?
|||No, actually it doesn't. I just tested it, and it appears that the event doesn't fire on configurations. Maybe someone from MSFT could comment on why it doesn't? I can guess a few reasons, but I think there are some valid scenarios where you would want to capture values even when they are set from configurations.
Back to your original question, they are adding a Watson-style debugger in 2008 that will dump the current state of the package on demand. That will include the variable values. Not a big help today, but something to look forward to.
|||Actually, the 2008 version will help once released. Any info on which CTP that feature will be in?
|||CTP 5, from what MSFT said at the PASS Summit.