I'm trying to do design time debugging of a dataflow component that I developed. I'm clearly doing something wrong, but I can't figure out what so I'm looking for suggestions if anyone has had a similar issue.
The reason I think I doing the steps correctly is that I can debug other components. However, that set seems to be limited to those developed in C#. My component is developed in VB. Shouldn't matter, I wouldn't think.
As a test I tried to debug other VB components from the SQL Server Samples and I have the same problem with them. Last one I tried was ChangeCaseVB. Though I just tried ChangeCaseVS and it didn't stop for me either...
The problem I have is when I drop the controls onto the design surface in the second instance of VS, the first instance of VS, which has the code for the component, does not hit any of the breakpoints, such as ProvideComponentProperties, which I know should be hit, and are hit when I debug a C# component.
To recap, I have an instance of VS open with the code for the component, developed in VB.
I compile the component.
I copy the component to C:\Program Files\Microsoft SQL Server\90\DTS\PipelineComponents
I gacutil the component and then it shows in C:\WINDOWS\assembly
I add the component to the toolbox in my second instance of VS where I am designing the SSIS package which will host the component
I attach my first VS instance to my second VS instance
I drop the component on the designer in the second VS instance.
At this point I expect the first VS instance to hit a breakpoint, it does not.
I have also tried the method of setting the external program and command line arguements in the component's VS for running dtexec.exe directly.
Any suggestions?
Debugging VB or C# is exactly the same, no issues there. I cannot see anything wrong with what you describe, so some general pointers.
Make sure the component has been compiled, GAC'd and copied to the PipelineCOmponenst folder, before you open the second instance of VS that hosts the SSIS project. This will ensure you use the correct version of the assembly, when loaded by the SSIS project, that matches the code instance of VS.
Make sure your code project is set to a Debug build, rather than Release.
Be aware that some properties are design-time, so attach to VS as you have, but others are run-time, in which case, the extrenal program and dtexec is the best way. The design-time hosts (VS) and runtime host (ideally DTEXEC) are different so to debug different methods you need to be attached to the correct host. There is VS run-time host as well, more on that here-
Building, Deploying, and Debugging Custom Objects
(http://msdn2.microsoft.com/en-us/library/b03685bc-5398-4c3f-901a-1219c1098fbe.aspx)
Thank you for the response and "reality check". I have been able to get debugging working now. I'd like to report that I had only one issue, but as I was testing with a variety projects trying to figure this out, they all seeminlgly had different problems, causing myself some extra grief. I still see the same issue from time to time, but overall it's going much better. Thanks for the help.
No comments:
Post a Comment