问题:
FlashPlayer插件对不同的浏览器有不同的版本,从其是否支持调试功能可分为:可调试插件和不可调试插件,两者主要区别有:
1) You can connect to it with the remote debugger The (right-click) context menu will include an option to "Show Redraw Regions", which lets you verify how much of your content is being redrawn each frame.
2) The debug player will show a pop-up error message for uncaught exceptions (in the regular player they would fail silently.
3) There are a handful of AS3 commands which only work in the debug player, such as System.gc(). See the System reference.
4) Basically the debug player has a sprinkling of features to make it more suited for development, and anyone developing their own content should probably be using it.
特别注意第2点,debug player在遇见未被不做错误时会弹出错误消息框,而regular player则不会报错。鉴于此,用户在使用flex应用时,往往会碰到不可遇见的怪现象,如用户点了保存按钮没反应,点了查询按钮没反应等。事实上,用户点击保存按钮的时候,程序执行过程中出错了,但是开发人员为捕捉错误,而不可调试player却未报错。
解决:
要解决此怪象,本人认为可以有3种解决方案。
1)所有flex 的代码全部进行try catch处理,估计程序员会变疯;
2)所有用户请使用带调试的插件,估计不是用户会变疯就是支持人员会变疯;
3)进行flex全局错误处理。
很明显,进行flex全局错误处理是比较好的解决方案,但是flex全局错误处理只支持flashplayer10.1及以后的版本,SDK需要4.1版本。因此,对于哪些sdk和flashplayer如有严格要求的flex应用就爱莫能助了。下述为flex全局处理的adobe的官方文档的一个例子:
http://help.adobe.com/zh_CN/AS3LCR/Flex_4.0/flash/events/UncaughtErrorEvent.html#includeExamplesSummary
遗憾的是flex新提供的错误全局处理机制,只支持application及sub application,对于module却不支持。
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
applicationComplete="applicationCompleteHandler();">
<fx:Script>
<![CDATA[
import flash.events.ErrorEvent;
import flash.events.MouseEvent;
import flash.events.UncaughtErrorEvent;
private function applicationCompleteHandler():void
{
loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorHandler);
}
private function uncaughtErrorHandler(event:UncaughtErrorEvent):void
{
if (event.error is Error)
{
var error:Error = event.error as Error;
// do something with the error
}
else if (event.error is ErrorEvent)
{
var errorEvent:ErrorEvent = event.error as ErrorEvent;
// do something with the error
}
else
{
// a non-Error, non-ErrorEvent type was thrown and uncaught
}
}
private function clickHandler(event:MouseEvent):void
{
throw new Error("Gak!");
}
]]>
</fx:Script>
<s:Button label="Cause Error" click="clickHandler(event);"/>
</s:WindowedApplication>
|
分享到:
相关推荐
Flex flashplayer_10_ax_debug模式,我今天找了好久,终于可以调试Flex程序.
flashplayer_10_ax_debug.exe flashplayer_10_ax_debug.exe flashplayer_10_ax_debug.exe
Debug调试版本的flash,用于flex调试代码
用于flex程序调试用的firefox的firebug插件。。。
Flex Skins For Flash 官方插件,用Flash开发FLEX组件的皮肤吧!方便!
flash调试版,用于flex开发调试,好不容易找到这个资源大家珍惜了
调试flex必须的插件。flash player 10的。
Flex调试专用插件! Flex Builder4 也就 Flash Builder 中会自带的那个!
NULL 博文链接:https://wangzheguilai.iteye.com/blog/1003876
最新版本的flashplayer_debug Flex开发必备
flex上传文件夹插件,可以方便的上传文件夹,可以添加到支持flash的环境中。
flex格式化插件,flex格式化插件,flex格式化插件
鉴于初学FLEX,AS的朋友从ADOBE的官网下载此调试版本经常找不到地方,因为默认被导向非调试版本,于是上传此工具,便于朋友们使用。
针对Flex不能Debug调试问题:调试器总是加载到48%时,加载到最后会出现会话超时提示框,详情请看文档。
3:但在使用过程中,却发现一个问题, 我的subclipse(eclipse下的插件,用于连接svn server的)的 svn view 和svn perspective都没有了,也就是说subclipse不可用了。在eclips\configurations目录下找到错误日志...
flashplayer_10_plugin_debug flex debug 最新调试版本
MyEclipse安装Flex 3 插件及新建Flex项目演示 所需软件 FlexBuilder3 beta2 插件版
NULL 博文链接:https://yao.iteye.com/blog/663514
QTP的flex2插件,直接安装运行,如果提示重启,重启电脑后,安装成功。