如何使用调试器进行 Actionscript 跟踪和/或组件流日志

发布于 2024-08-19 12:01:59 字数 229 浏览 10 评论 0原文

一个现有的(虽然不完整)FLEX3 项目交给我们来完成(总是一场噩梦)。

它很小但高度抽象(包含超过 150 个文件,但仅支持大约 10 个页面视图)。我试图通过这个迷宫追踪单个鼠标单击事件。

有没有办法使用调试器(或任何其他人知道的工具)打印出动作脚本跟踪和/或组件流?

flash.txt 文件看起来毫无价值,因为它不包含 ActionScript 调用和/或组件流。

谢谢

An existing (though incomplete) FLEX3 project was given to us to finish (always a nightmare).

It is quite small but highly abstracted (contains well over 150 files to support only about 10 page views). I'm attempting to trace a single mouseclick event through this maze.

Is there a way to print out an actionscript trace and/or component flow using the debugger (or any other tool that anyone knows of)?

The flash.txt file appears worthless since it doesn't contain ActionScript calls and/or component flows.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

俯瞰星空 2024-08-26 12:01:59

这将打印您的执行图:

Trace.setLevel(Trace.METHODS, Trace.LISTENER);
Trace.setListener(handleMethods);

function handleMethods(fqcn:String, lineNumber:uint, methodName:String, methodArguments:String):void
{
  trace(methodName);
}

This will print your execution graph:

Trace.setLevel(Trace.METHODS, Trace.LISTENER);
Trace.setListener(handleMethods);

function handleMethods(fqcn:String, lineNumber:uint, methodName:String, methodArguments:String):void
{
  trace(methodName);
}
温柔女人霸气范 2024-08-26 12:01:59

钱币。是的,总是。

Profiler 可能会为您提供有用的信息,但如果您还没有,则需要付费购买 FlexBuilder Pro 才能获得它。我对 Profiler 不太熟悉,所以我的建议可能有误。不过,如果您已经熟悉其他分析工具,那么值得一试。

我可能会开始查看代码中出现的每一点 .addEventListener(MouseEvent.CLICK - 和 .addEventListener("click"),以防万一以前的开发人员选择出于某种原因,不使用常量。

显然,这可能会在 150 个文件中出现很多,但这就是我会考虑的方式,

因为可能会出现 CLICK。事件在某个时刻被处理,并且处理程序可能会调度另一个自定义事件,或者调度 MouseEvent.CLICK 事件等。

希望有帮助。

Oof. Yeah, always.

The Profiler might give you useful information, but you need to pay for FlexBuilder Pro to get it, if you don't already have it. I'm not real handy with the Profiler, so I may be off base with that advice. It would be worth checking into, though, if you are already familiar with other profiling tools.

I would probably just start looking at every point that .addEventListener(MouseEvent.CLICK occurs in the code - and .addEventListener("click", just in case the previous developer chose not to use the constant, for some reason.

Obviously, that could show up a lot in 150 files, but that's how I would go about it.

I would also look at any custom events that could get into the mix. Because maybe the CLICK event is handled at some point and the handler dispatches a custom event. And maybe the handler for that custom event dispatches another custom event. Or dispatches a MouseEvent.CLICK event, etc.

Hope that helps. Good luck...

三生路 2024-08-26 12:01:59

查看

http://jpauclair.net/2010/02/10/mmcfg-treasure /

特别是。

AS3Trace = 1|0

这个也非常有用
调试它跟踪每个调用
到任何被调用的函数
运行时在 SWF 中!就像
充分扩展 StackTrace
软件运行时间。

还有更多。

Check out

http://jpauclair.net/2010/02/10/mmcfg-treasure/

esp.

AS3Trace = 1|0

This one is also very useful for
debugging It trace every single call
to any function that is being called
in the SWF at runtime! It’s like
expending the StackTrace to the full
software run time.

And many more.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文