开发者

Flash builder 4 tracing problem in debug mode

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>


I came across the same problem. trace stopped to work at one time. What helped for me was exporting the project, deleting it from the workspace (so you have still one copy with the exported project) and importing it again.


Not an answer but I also experienced this ... my project contained a swc flexComponentBase library exported from flash ... after I removed all references to that in my code, the trace fired up again. Also the permit debugging option in flash>publish was activated...

Rebuilding my component in flash and re-converting to flex component again - now trace is working -- weirdness...


I have also had this issue and the answers here did not help me. I found that some of the compiler args were still true. You can see what the true compiler arguments are by dumping the config add this to condidtional compiler options:

-dump-config myConfig.xml

That should appear in your bin-debug folder, have a look in there at the various settings, I needed to change -optimize=false and various others to get trace working again.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜