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

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

问题描述



我正在运行调试,我也加入到了在Flash Builder中使用trace(),但它不工作! flex编译器选项-debug = true选项。
我在做什么错误?

解决方案

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

-compiler.omit-trace-statements



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

但是fcsh有一个错误。 / p>

如果您在为-debug = true模式编译了swf之后,使用-debug = true编译swf,则
trace语句仍然被忽略。 b
$ b

如果重新启动fcsh,跟踪已启用。

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

Test.as

  package {
import flash.display.Sprite;

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


$ b code
$ b

Test-config.xml

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


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

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

解决方案

In flex 4, a new compiler option is added.

-compiler.omit-trace-statements

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

BUT there is a bug in fcsh.

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

If you reboot fcsh, the trace is enabled.

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

Test.as

package {
    import flash.display.Sprite;

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

Test-config.xml

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

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

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