首页>技术文章>Win7下配置Eclipse+Flex调试环境(原创)

一、安装MyEclise及flex builder,网上很多教程,就不再介绍

二、安装flash player debugger:
1.安装:推荐使用适合于Firefox的版本,下载地址:http://download.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_plugin_debug.exe

2.拷贝flex插件至Firefox:
将C:\Windows\System32\Macromed\Flash\NPSWF64_11_9_900_117.dll拷贝至C:\Program Files (x86)\Mozilla Firefox\plugins下。

3.在eclipse中要指定使用Firefox浏览器:
MyEclipse中配置:window->preference->Genernal->Web Browser,选择firefox。
点击add按钮,就会弹出一个对话框,关键将你firefox.exe所在的路径选上,写上名字,就OK了。

当然还要把默认的调试浏览器设置为firefox,点apply就可以,接下来你点击debug按钮,跳出的就是Firefox了。

三、配置Flex Web工程
1.选中Flex工程,右键->属性,在左侧选中Run/Debug Settings,点击右侧New。选中Flex Application ,OK。
2.如果Main窗口中的程序url地址不对,可以把下边的Use defaults CheckBox勾掉,写上程序的url地址,点击OK 。
3.Common窗口中Display in favorites menu中选中Debug。

四、调试
完成以上步骤后,重启firefox及myeclipse。

在Flex工程中加入断点,并且使用trace()输出。
对于一般的Flex程序调试时选择工程中的index.mxml,右键选择debug as->Flex Application。

对于Web工程,需要:debug as->MyEclipse Server Application,
同时也需要:debug as->Flex Application。
这样分别可以在前台及后台进行debug。

本文地址:http://www.caihonger.com/tech25/



请写下您的评论