Debug.WriteLine ?

Jul 26, 2009 at 12:11 AM

Is there an easy way to Debug.WriteLine to the T4 Editor Output window?  I can't seem to get this to work...

Jul 26, 2009 at 4:26 AM

It would be nice to have, but require additional work. I went ahead and submitted an enhancement request with details of how this could be done:

 Would you be interested in implementing it?

Jul 26, 2009 at 6:01 PM
Edited Jul 26, 2009 at 6:17 PM

Sure thing, boss.  I got the Window Output working.  Hooking up the TraceListener will be another thing.  Are you suggesting I become a contributor for this to happen? :P

EDIT: Just got the TraceListener working, no prob.  I think this is something that should be added into the TransformationContext when it initializes.  Would sure be nice.

I can add this to the project if you'd like.  Or let me know and I'll send it to you however you want.

Jul 28, 2009 at 11:27 AM

Thanks, Michael. I agree with the suggestion to add this listener to Debug.Listeners in the TransformationContext class. OnTransformationStarted method would be appropriate for this.

Could you implement this locally and upload modified files as a patch?

Jul 28, 2009 at 2:04 PM

Done.  I was getting build errors with BizTalk (don't have it installed) so I couldn't quite verify if it works, but it should be good to go. :)

Jul 29, 2009 at 3:06 AM

I don't have it either - I simply comment out the BizTalk tasks in the SDC tasks file.