调试模式下的 Flash Builder 4 跟踪问题 [英] Flash builder 4 tracing problem in debug mode

查看:25
本文介绍了调试模式下的 Flash Builder 4 跟踪问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Flash Builder 4 中使用 trace() - 但它不起作用!

I am trying to use trace() in flash builder 4 - but it doesn't work!

我在调试"中运行,我还在 flex 编译器选项中添加了-debug=true"选项.我做错了什么???

I am running in "debug", also I added to the flex compiler options the "-debug=true" option. What am I doing wrong ???

推荐答案

在 flex 4 中,添加了一个新的编译器选项.

In flex 4, a new compiler option is added.

-compiler.omit-trace-statements

-compiler.omit-trace-statements

默认值设置为 true.此模式省略了 -debug=false 模式的跟踪语句,并自动启用 -debug=true 模式的跟踪.

the default value is set to true. this mode omits trace statements for -debug=false mode and enable trace for -debug=true mode automatically.

但是 fcsh 中存在一个错误.

BUT there is a bug in fcsh.

如果您在将 swf 编译为 -debug=true 模式后使用 -debug=true 编译它,仍然省略了跟踪语句.

If you compile the swf with -debug=true after once compiled it for -debug=true mode, trace statements are still omitted.

如果您重新启动 fcsh,则会启用跟踪.

If you reboot fcsh, the trace is enabled.

为避免这种情况,您可以通过设置 flex-config 来禁用 omit-trace-statements.

To avoid this, you can disable omit-trace-statements by setting flex-config.

测试.as

package {
    import flash.display.Sprite;

    public class Test extends Sprite {
        public function Test() {
            trace("trace omitted?!");
        }
    }
}

测试配置.xml

<flex-config>
  <compiler>
    <debug>false</debug>
    <omit-trace-statements>true</omit-trace-statements>
  </compiler>
</flex-config>

这篇关于调试模式下的 Flash Builder 4 跟踪问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆