20080719 flex debug trace
http://www.yippeesoft.com

1/Download the Windows Flash Player 9 Projector content debugger (EXE, 3.69 MB)
2/打开Project-Properties(快捷键alt+p-p),在ActionScript Compiler里把Generate HTML wrapper file的勾勾去掉就行了:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" horizontalAlign="center" verticalAlign="middle"
    >
    <mx:Script>
     <![CDATA[
     
     import mx.controls.Alert; 
       public function eventtest():void
&leftsign;
lll.text="sdfsdf";
&rightsign;
     ]]>
    </mx:Script>
 <mx:Panel
        paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10"
        title="My Applicationsdfsdf" 
     width="700" height="418">

        <mx:Label id="lll" text="Hello World!" fontWeight="bold" fontSize="24"/>
        <mx:Button label="Click Me" click="eventtest();"/>
    </mx:Panel>
 
</mx:Application>

FLEX中如何快速注释?
shift+ctrl+c / shift+ctrl+d 加AS3代码注解块

 Flex不能使用调试问题解决[原]
原因:新的Flashplayer9.0去掉了调试功能
解决:
      1.下载uninstallflashplayer,调试版的player for IE,player for other,执行文件
      2.依次运行,将执行文件放在Flex2/player/debuger下
      3.文件类型swf指向该执行文件

      除了air外,ActionScript Project和Flex Project默认都是在浏览器里调试的,有时候比较麻烦,特别是机器比较烂的时候(比如我)。

可以设置成在播放器里调试,这样比较快。打开Project-Properties(快捷键alt+p-p),在ActionScript Compiler里把Generate HTML wrapper file的勾勾去掉就行了:

Download the Windows Flash Player 9 ActiveX control content debugger (for IE) (EXE, 1.59 MB)

Download the Windows Flash Player 9 Plugin content debugger (for Netscape-compatible browsers) (EXE, 1.56 MB)

Download the Windows Flash Player 9 Projector content debugger (EXE, 3.69 MB)

Trace的重要性不必我强调,但是在最新的Flex Builder 3 中并不能轻松的实现这个功能,今天参考了《Flex 3 Cookbook》,总算解决了这一问题:

一、下载安装带DEBUG版本的Flash Player;

注意下载Firefox可用的:

Windows Flash Player 9 Plugin content debugger (for Netscape-compatible browsers) (EXE, 1.52 MB)

二、按F11运行工程,即可以在控制台看到Trace输出。

如果想体验高级功能,可以安装 sephiroth 发布的的Firefox插件FlashTracer。

二、trace命令

1.启动调试。单击[Debug Tracing]按钮即可。

2.结束调试。打开调试Web浏览器窗口以前,控制台窗口和调试窗口上部[Terminate]按钮是不可用的。当浏览器窗口打开后,它们就被激活了,单击它们即可终结调试进程,我们也可以通过关闭Web浏览器窗口来结束调试。

3.查看调试结果。调试结束后,就可以在控制台窗口中查看调试结果了。哪怕是没有任何附加代码,Flex Builder 至少可以返回被调试程序编译成swf文件后的大小。

TRACE的问题是要装debug版,而且FLASH PLAYER也是要除错版,也就是DEBUG版,下载地址是:

http://www.adobe.com/support/flashplayer/downloads.html

该版本可以把追踪的内容写入文件,flash player 所用的文件是由mm.cfg决定的,mm.cfg 储存在:

windows xp      c:\\Documents and settings\\[user name]\\mm.cfg
windows 2000 c:\\mm.cfg
mac os x          machd:library:Application support:macromedia:mm.cfg(第一次知道其它系统是用

其中,TraceOutputFileEnable 可以是0(不写入文件)或是1(写入文件)

TraceOutputFilename是要写入文件的路径

历史博文

标签:, , ,
三月 5, 2009 at 12:02 下午 by yippee 1,127 次
Category: Dev
Tags: , , ,