The following table lists the properties that you can set in the mm.cfg file:
FLEX Debugging your application
If you encounter errors in your applications,you can use the debugging tools to perform the following:
Debugging Flex applications can be as simple as enabling?trace()?statements or as complex as stepping into a source files and running the code,one line at a time. The Flex Builder debugger and the command line debugger,fdb,let you step through and debug ActionScript files used by your Flex applications. For information on how to use the Flex Builder debugger,see?Using Adobe Flex Builder?3. For more information on the command line debugger,see?Building and Deploying Adobe Flex?3 Applications. Using Flash Debug PlayerTo use the fdb command line debugger or the Flex Builder debugger,install and configure Flash Debug Player. To determine whether you are running the Flash Debug Player or the standard version of Flash Player,open any Flex application in Flash Player and right-click. If you see the Show Redraw Regions option,you are running Flash Debug Player. For more information about installing Flash Debug Player,see the LiveCycle Data Services ES installation instructions. Flash Debug Player comes in ActiveX,Plug-in,and stand-alone versions for Microsoft Internet Explorer,Netscape-based browsers,and desktop applications. You can find Flash Debug Player installers in the following locations:
Like the standard version of Adobe Flash Player 9,Flash Debug Player runs SWF files in a browser or on the desktop in a stand-alone player. Unlike Flash Player,the Flash Debug Player enables you to do the following:
Note:?ADL logs?
trace()
?output from AIR applications.
Using logging to debug your applicationOne tool that can help in debugging is the logging mechanism. You can perform server-side and client-side logging of requests and responses. Client-side loggingFor client-side logging,you directly write messages to the log file,or configure the application to write messages generated by Flex to the log file. Flash Debug Player has two primary methods of writing messages to a log file:
Flash Debug Player sends logging information to the flashlog.txt file. The operating system determines the location of this file,as the following table shows:
Use settings in the mm.cfg text file to configure Flash Debug Player for logging. If this file does not exist,you can create it when you first configure Flash Debug Player. The location of this file depends on your operating system. The following table shows where to create the mm.cfg file for several operating systems:
The mm.cfg file contains many settings that you can use to control logging. The following sample mm.cfg file enables error reporting and trace logging: ErrorReportingEnable=1 TraceOutputFileEnable=1 After you enable reporting and logging,call the?trace()?method to write a String to the flashlog.txt file,as the following example shows: trace("Got to checkpoint 1."); Insert the following MXML line to enable the logging of all Flex-generated debug messages to flashlog.txt: <mx:TraceTarget loglevel="2"/> For information about client-side logging,see?Building and Deploying Adobe Flex?3 Applications. Server-side loggingYou configure server-side logging in the logging section of the services configuration file,services-config.xml. By default,output is sent to System.out. You set the logging level to one of the following available levels:
You typically set the server-side logging level to?Debug?to log all debug messages,and also all info,warning,and error messages. The following example shows a logging configuration that uses the?Debug?logging level: <logging> <!-- You may also use flex.messaging.log.ServletLogTarget. --> <target class="flex.messaging.log.ConsoleTarget" level="Debug"> <properties> <prefix>[Flex]</prefix> <includeDate>false</includeDate> <includeTime>false</includeTime> <includeLevel>false</includeLevel> <includeCategory>false</includeCategory> </properties> <filters> <pattern>Endpoint</pattern> <!--<pattern>Service.*</pattern>--> <!--<pattern>Message.*</pattern>--> </filters> </target> </logging> For more information,see?Logging. Measuring application performanceAs part of preparing your application for final deployment,you can test its performance to look for ways to optimize it. One place to examine performance is in the message processing part of the application. To help you gather this performance information,enable the gathering of message timing and sizing data. The mechanism for measuring the performance of message processing is disabled by default. When enabled,information regarding message size,server processing time,and network travel time is captured. This information is available to the client that pushed a message to the server,to a client that received a pushed message from the server,or to a client that received an acknowledge message from the server in response a pushed message. A subset of this information is also available for access on the server. You can use this mechanism across all channel types,including polling and streaming channels,that communicate with the server. However,this mechanism does not work when you make a direct connection to an external server by setting the?useProxy?property to?false?for the HTTPService and WebService tags because it bypasses the LiveCycle Data Services ES Proxy Server. You use two parameters in a channel definition to enable message processing metrics:
Set these parameters to?true?or?false; the default value is?false. You can set the parameters to different values to capture only one type of metric. For example,the following channel definition specifies to capture message timing information,but not message sizing information: <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel"> <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/> <properties> <record-message-times>true</record-message-times> <record-message-sizes>false</record-message-sizes> </properties> </channel-definition> 转载地址:http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=build_apps_6.html (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |