2

I have a huge Perl script,which many times it hangs, When it's in running state, i need to find out, which step it's now executing.
I don't want "Devel::Trace" [compile time entity], Is there anything like strace kind of thing? to which i can pass the pid of the script and it will show me, what is it executing at run time. Please let me know.

~ Mandar.

4

2 回答 2

3

什么是“步”?

您提到strace,并strace跟踪系统调用。如果那是您想要的,请尝试使用strace. 它与 Perl 完美配合。

如果要跟踪正在执行的Perl 语句,可以在perldPerl 调试器中运行脚本。它具有跟踪功能。这个函数也由Devel::Trace通过一个非常简单的接口提供。

(我不知道你对 Devel::Trace 有什么问题。你似乎暗示它没有显示在执行时执行了哪些语句,但这正是它的作用。)

于 2012-02-10T08:14:12.647 回答
0

把自己画在一个既不能用调试模块重新启动程序,也不能克隆环境的角落是个坏主意,这样你就可以在生产环境之外进行试验。

在运行时注入Enbugger调试器之前,请三思而后行,寻找风险较小的措施。

于 2012-02-10T08:50:42.270 回答