【问题标题】:stop traces in swc-library (actionscript3)停止 swc 库中的跟踪 (actionscript3)
【发布时间】:2011-07-15 17:22:08
【问题描述】:

我在 flash-builder 中使用的 swc-library 中嵌入了很多痕迹。 我可以在不触及其代码的情况下摆脱它们吗?怎么样?

谢谢

【问题讨论】:

  • 否:除非您编辑 swc 源并重新编译,否则没有 AFAIK

标签: actionscript-3 trace swc


【解决方案1】:

在 Flash Builder 中的项目属性下:omit-trace-statements 设置为 true。

那么它应该跳过所有的痕迹。

【讨论】:

  • omit-trace-statements 设置为 true 有known issues,所以最好使用 Apparat 框架。
  • omit-trace-statements 也会关闭您的跟踪,而不仅仅是来自逐字 swc 的那些。
【解决方案2】:

您可以使用来自 Joa Ebert Apparat 框架的 stripper 工具:

stripper -i my-swc-library.swc
Stripper

此工具删除所有调试 来自 SWF 文件的信息。它是一个 类型安全的删除保留
副作用。这意味着像这样的循环 这 而(iter.hasNext){跟踪(iter.next())} 会被重写为 while(iter.hasNext) { iter.next() } Stripper 还删除了所有与调试相关的字节码。 例子: 剥离器 -i 输入.swf -o 输出.swf 剥离器 -i 输入和输出.swc

【讨论】:

    猜你喜欢
    • 2022-10-04
    • 1970-01-01
    • 1970-01-01
    • 2011-01-26
    • 2012-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-13
    相关资源
    最近更新 更多