如何在 SSIS 中调试脚本组件 [英] How to debug a script component in SSIS

查看:41
本文介绍了如何在 SSIS 中调试脚本组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这很简单,但我无法让它发挥作用,我在很多地方阅读了很多解决方案,但没有任何效果对我有用.我怎样才能做到这一点?

It's simple but I can't make it work, and I read in so many places a lot of solutions but nothing worked for me. How can I accomplished this?

注意

我在我的代码中放置了一个断点并运行了整个包,但它仍然不起作用.

I put a break point in my code and ran the entire package, but it still did not work.

推荐答案

Script 组件不支持使用断点.因此,您无法在程序包运行时单步执行代码并检查值.可以使用以下方法监控Script组件的执行

The Script component does not support the use of breakpoints. Therefore, you cannot step through your code and examine values as the package runs. You can monitor the execution of the Script component by using the following methods

使用System.Windows.Forms 命名空间 中的MessageBox.Show() 方法中断执行并显示模式消息.(完成调试过程后删除此代码.)

Interrupt execution and display a modal message by using the MessageBox.Show() method in the System.Windows.Forms namespace. (Remove this code after you complete the debugging process.)

针对信息性消息、警告和错误引发事件.FireInformation、FireWarning 和 FireError 方法在 Visual Studio 输出窗口中显示事件描述.但是,FireProgress 方法、Console.Write 方法和 Console.WriteLine 方法不会在输出"窗口中显示任何信息.FireProgress 事件的消息显示在 SSIS 设计器的进度"选项卡上.

Raise events for informational messages, warnings, and errors. The FireInformation, FireWarning, and FireError methods display the event description in the Visual Studio Output window. However, the FireProgress method, the Console.Write method, and Console.WriteLine method do not display any information in the Output window. Messages from the FireProgress event appear on the Progress tab of SSIS Designer.

http://microsoft-ssis.blogspot.com/2011/04/breakpoint-does-not-work-within-ssis.html

这篇关于如何在 SSIS 中调试脚本组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆