Display Flash Debug Log to a console - actionscript-3

I am debugging my flash application, what is the best way to read the trace log from a non browser ? I want to be able to read in a C# application.
Any suggestions ?
Regards

Adobe Scout, Flash, and Monster Debugger call all report debug information from a flash app running in a browser and provide excellent debugging features. The flash debug player sends logging info to a flashlog.txt which you could read with a C# app if that's really what you wanted to do.
There's also the ExternalInterface class.

Related

Available Functions on FMS Server

I have a chat client that uses FMS server. I do not know how many more functions are on FSM that I can utilize. There is 0 documentation for the available FMS server. Is there a way to browse or query all the available features/functions of Adobe FMS server?
Also some of the chatters crashes my flash play remotely. I think, they are just overflowing the buffer? Is it the case? or how anyone can remotely crash my flash player? This only happens if I kick any of the specific user using the command /kick user.
FMS has pretty good doc at FMS API. But functions you want depend of who implemented server side for you.
Crash might be caused of your chat implementation. You need to find initial developer to fix that.

Using Bluetooth ANE for Android

I'm relatively new to flash, air and AS3 so I'm sorry if this comes of as a beginners question. I have made an application in AIR to run on windows and communicate with my atmega8 chip through serial communication via serproxy.
Now I want to port that application to android to perform the same basic functions but communicate to the atmega8 via bluetooth. So I created a new Air for android file in Flash CS6 copied my code from my previous application excluding the communication through sockets part and created an apk which ran on an android phone:). It did everything except the communication as expected.
Now I have been trying to implement the as3breeze.com/bluetooth-ane and use it to communicate but I'm not too sure how to go about the whole thing. I have imported the ane through actionscript settings and have implemented the classes but when I try to test I get this error.
The content cannot be loaded because there was a problem loading an extension: Error: Extension namespace is invalid for C:\Users\AppData\Local\Temp\Tmp_ANE_File_Unzipped_Packages\AndroidBluetooth.ane
So after some searching I found posts talking about as3 sdk and flash builder. Do I really need all these things or can I make my bluetooth app work some how with just flash cs6? Also what exactly does my error mean and how can I solve it. Thanks in advance for any help. I have been searching so a solution to this for days and I either get an explanation that does not work or I lack the knowledge to understand.
The path that can't be accessed makes me believe you haven't extracted the ANE (basically you're trying to access a temporary directory). Try extracting the ANE file to somewhere, like My Documents or wherever your flash project is, and include (in the actionscript settings) that path instead.
Hope it helps.

How to detect Flash runtime errors?

I'm developing an AS3 application with the commandline tools from the Flex SDK. My workflow is:
write code
compile with mxmlc
run the SWF file in favorite webbrowser
repeat
The second step catches compile-time errors, but what about run-time errors and warnings? And trace() output? How can I see that?
I'm not using any IDE with debugging capabilities.
Get the debug version of the Flash player and Firebug for Firefox, then you can see the traces and errors in the console.
When a run-time error occurs that isn't caught by an exception handler you will get a popup telling you about the error.
Why not get http://www.flashdevelop.org/? It's free and it has debugging, profiling and all other goodies you can expect from an IDE.
Although the Flash debugger is a pretty good choice. I would personally suggest Monster Debugger. It is a great debugger with a very intuitive user interface and it has a plethora of features that make debugging extremely easy.
Flash player debugger writes the output of trace() to the flashlog.txt file. Its location is hardcoded and is different on different systems. On Linux it is in ~/.macromedia/Flash_Player/Logs/flashlog.txt. In order to have The debugger to actually write into that file, you need yet another file, mm.cfg, it's location and name are again hardcoded. It should be in ~/mm.cfg. It may contain many different options, but the one you are interested in is ErrorReportingEnable=1.
You may then $ tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt to see the progress as the file is been written to.
Note that the directory and the file must be writable by the user running the player. Flash player will not issue any warnings if that is not the case, and will fail silently.
Also note that if you are happened to be on Linux, then there isn't a 64-bit version of a debugger player... However, the player runs fairly well under Wine, the Windows version that is.
You may debug using commandline debugger found in SDK. it's called fdb (fdb.exe or in Apache Flex fdb.bat on Windows). It has similar to gdb interface, can do breakpoints, some runtime code evaluation, disassemble functions, look up stack frames and their variables and most of the other stuff you'd expect a debugger to do. I'm usually running it from Emacs, but I would imagine that running it from Vi[m] or whatever editor you are using shouldn't be a problem...
If you were using Emacs, it is actually possible to hook up Flymake to a part of the SDK that does syntax checking while you type. You can find more info on how to do that here: http://www.flashdevelop.org/community/viewtopic.php?f=13&t=9238 (thanks Philippe).

Logging IN flex running flash player in normal mode (not in debug mode)

I am new to flex, so not sure if my requirement is a valid use case for flex 3.
I have a set of users who run my application in non debug mode. Off late they have been reporting lot of issues. But I am not able to debug as there is no log file.
Is it possuible in flex 3 to do logging in a file without running in debug version. I understand trace only works if we run application in debug version.
Thanks for help!!!
Logging via flash trace statements to the console or via the FlashLog.txt (mm.cfg) require the debug flash player. There are alternative ways to output debug content that don't rely on this, though.
Here's a whole post I wrote on one method: http://labs.tomasino.org/2009/12/04/flash-as3-debug-logging/

Good logging framework for ActionScript 3 projects

I'd like to found some logging framework for AS3. For now I use trace() and debug version of Flash Player, but I'm looking something that can be enabled without having debug version installed?
Also, if you just want to view trace output with DebuggingPlayer that's no problem - download a program called "Vizzy Flash Tracer", it's just a proxy that listens for output from .swfs and displays it, with filtering options built in. Very useful, it's saved my ass many times!
Get it here: http://code.google.com/p/flash-tracer/
There are more then a couple of logging frameworks.
I really like 2
as3commons logging
MonsterDebugger
I use them both in projects.
Good luck