简体   繁体   English

使用EPIC调试器:如何在程序不正确退出时看到有意义的堆栈跟踪

[英]Using EPIC debugger: how to see get a meaningful stack trace when program exits improperly

I'm new to both perl and epic, so forgive me for asking obvious things. 我既不熟悉Perl,也喜欢史诗,所以请原谅我提出明显的问题。 I did do some playing around online and did not find anything though. 我确实在网上玩了一些,但是什么也没找到。

I'm running a perl program in the debugger, which fails. 我正在调试器中运行perl程序,该程序失败。 When it fails I get a rather unhelpful message. 当它失败时,我会得到一条毫无帮助的信息。 I can't copy and past it, and I can't write it by hand because it has so many unrecognizable characters. 我无法复制和粘贴它,也无法手工书写,因为它有很多无法识别的字符。 It looks something like: 看起来像:

Debugged program terminated.  use [imq[0m to quit or [1mr[om to restart, 
use [1mo[0m [4minhibit_exit[24m to avoid stopping after program termination

Everywhere that has brackets shows as an undefined character in the eclipse consol window. 在Eclipse consol窗口中,带有方括号的所有位置均显示为未定义的字符。

What I don't get is any kind of useful stack trace. 我没有得到的是任何有用的堆栈跟踪。 I can see that the setup_ram_directories method was called because it's the last line of the debugger before the error. 我可以看到调用了setup_ram_directories方法,因为它是调试器在错误发生之前的最后一行。 However, the actual error occurs deeper down the stack. 但是,实际错误发生在堆栈的更深处。 I don't get a stack trace, nor can I get eclipse to pause when an error comes up so I can inspect the memory state that caused the failure. 我没有堆栈跟踪,也无法在出现错误时使Eclipse暂停,因此我可以检查导致故障的内存状态。

Some extra playing around seems to suggest that EPIC is confused whenever a method defined in a different module is called, the setup_ram_directories being defined in a helper module. 一些额外的玩笑似乎表明,每当调用在不同模块中定义的方法时,EPIC就会感到困惑,setup_ram_directories在帮助器模块中定义。 If I have stepped deeper into the above method until I'm in a method contained within the module that throws an exception and then hit run I get a proper stack trace. 如果我已经更深入地研究了上面的方法,直到进入了包含在引发异常的模块中的方法,然后命中运行,我就会获得正确的堆栈跟踪。 However, for errors deep in my stack it takes multiple runs of the program to determine what methods & modules are failing before I get to the point where I get a proper stack trace. 但是,对于堆栈中的错误,在到达正确的堆栈跟踪点之前,需要多次运行程序以确定哪些方法和模块失败。

Is there some configuration I need to do to get PERL to provide me a proper stack trace? 我需要做一些配置来获得PERL,以便为我提供正确的堆栈跟踪吗? Or better yet I would prefer to have the debugger pause when the program is going to fail so I can inspect variables. 或者更好的是,我希望在程序失败时让调试器暂停,以便我可以检查变量。

I have tried o inhibit_exit from perl expressions view, it didn't seem to do anything. 我已经尝试过从perl表达式视图中去hibit_exit,它似乎什么也没做。

Try the following plugin which works with EPIC: 尝试以下与EPIC兼容的插件:

http://andrei.gmxhome.de/anyedit/ http://andrei.gmxhome.de/anyedit/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Eclipse/EPIC 中操作 Perl 调试器 - How to operate the Perl debugger in Eclipse/EPIC 使用 NonStop 调试器选项时如何将 perl 脚本的调试跟踪重定向到文件? - How to redirect debug trace of perl script to file when using NonStop debugger option? 在调试器中运行Perl代码时,警告会引起堆栈跟踪:我可以防止这种情况发生吗? - Warnings cause stack trace when running Perl code in debugger: can I prevent this? 如何在Eclipse / EPIC中取消此多余的调试器输出? - How can I suppress this superflous debugger output in Eclipse/EPIC? 如何仅从Perl程序的主程序包获取跟踪输出 - How to get trace output from only the main package of a Perl program eclipse 中的 Perl EPIC:尝试运行 Z0114AD4E 脚本36D72395EF18A 时,如何摆脱此 Ant 构建对话框? - Perl EPIC in eclipse: How do I get rid of this Ant Build dialog when trying to run a Perl script? Eclipse Timing Out中的Perl EPIC调试器 - Perl EPIC Debugger in Eclipse Timing Out 如何使用 Perl 脚本使用 Eclipse Epic 测试 Android 应用程序? - How to use Perl script for testing Android applications using Eclipse Epic? 如何使用EPIC在Eclipse中运行Perl测试用例? - How can I run Perl test cases in Eclipse using EPIC? 如何使用Epic在项目中导入perl脚本? - How can I import perl scripts in a project using Epic?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM