调试从非调试外部 swf 加载的内部 swf 的最佳方法是什么?

发布于 2024-07-16 14:22:11 字数 297 浏览 7 评论 0原文

我有一个 swf,需要将 Flex 构建器调试器附加到它。 我可以完全访问源代码,并且可以对此 swf 进行调试构建。

但是,此 swf 正在由另一个 swf 的非调试版本加载,我没有源代码,并且无法使用该版本进行调试版本。

这可能吗?

我尝试用两个非常简单的 swf 来模拟它,虽然当两者都是调试版本时它工作正常,但当外部 swf 是非调试版本时,虽然我可以让调试器连接,但我没有得到跟踪消息、断点不起作用,并且似乎锁定了 Flash 应用程序。

有什么想法吗? 我有什么明显遗漏的东西吗?

I have a swf that I need to attach the flex builder debugger to. I have full access to the source code, and can make a debug build of this swf.

However, this swf is being loaded by a non-debug build of another swf which I don't have source code to, and can't make a debug build with.

Is this possible?

I've tried mocking this up with two very simple swfs, and while it works fine when both are debug builds, when the outer swf is a non-debug build, while I can get the debugger to connect, I don't get trace messages, breakpoints don't work, and it seems to lock up the flash app.

Any thoughts? Is there something obvious I'm missing?

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

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

发布评论

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

评论(2

也只是曾经 2024-07-23 14:22:11

有趣的是,如果您编译一个几乎空的 SWF,该 SWF 仅加载到非调试 SWF(加载启用调试的 SWF)中,会发生什么? 即调试> 非调试> DEBUG ...非调试级别是否取消其“子级”的调试消息?

我认为你想要的是使用flex调试器进行堆栈跟踪等。但是在你的SWF中使用自定义记录器是很好的,如果你想让某人远程调试在线版本等,这会特别方便。有一些可以谷歌,但是我想到的最新消息是 ThunderBold

Interesting, what happens if you compile an almost empty SWF that just loads in the non-debug SWF (that loads the debug enabled one) ? i.e DEBUG > NON-DEBUG > DEBUG ... does the non-debug level cancel debug messages for its 'children' ?

I reckon what you want is to use flex debugger for stack traces etc. but it's good to use a custom logger within your SWF, this is specially handy if you want somebody remote debug a version on-line etc. There's a few to google but the latest from the top of my mind is ThunderBold.

左秋 2024-07-23 14:22:11

根据 Theo 的想法,您可能需要引用调试容器中的类。 然后,只要将非调试 swf 加载到同一(或子)应用程序域(并且非调试 swf 也执行相同操作),那么您就能够闯入内部调试 swf。

你可以像这样引用类(这是一种味道,但即使是 Flex 在内部也是这样做的):

import com.pkg.ClassToDebug; ClassToDebug;
import com.pkg.AnotherClassToDebug; AnotherClassToDebug;
// ... etc

package com.what.ever
{
    public class ApplicationClassInDebugContainer
    {
    }
}

Further to Theo's idea, you will probably need to reference the classes in the debugging container. Then, as long as you load the non-debug swf into the same (or a child) application domain (AND the non-debug swf does the same) then you will be able to break into the inner-debug swf.

You can reference classes like so (it's a smell, but even Flex does it internally):

import com.pkg.ClassToDebug; ClassToDebug;
import com.pkg.AnotherClassToDebug; AnotherClassToDebug;
// ... etc

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