View Full Version : Debugging flash without installing the debug player
die_caro
07-12-2011, 08:49 PM
I use the trace function in flash as a way to log user actions. The problem is that I cannot install any software at computers where I want to use my program.
I already tried one way to work around it: I installed firefox portable on a flash drive and added the debug player as a plugin and firebug as an extension. This worked fine onh the my own computers, but not with the computers I intended to use it on.
Does anybody have another option?
drkstr
07-12-2011, 11:19 PM
Try the as3commons-logging (http://www.as3commons.org/as3-commons-logging/index.html) library.
Barna Biro
07-13-2011, 08:24 AM
Or you could write your own mechanism... for example, have a global log method that will in fact make a call to the server-side and log your messages in files. I took a look at as3commons-logging quite a while ago, but I don't find it any good, mainly because it can't log to file ( only with AIR apps from what I saw... also, the documentation, from my point of view, is almost useless crap ).
die_caro
07-13-2011, 08:37 AM
This seems like a solution to my problem, but I don't get it working. The user and setup guide isn't really helping :S
die_caro
07-13-2011, 08:40 AM
Well, I actually just started programming in flash. So writing my own log method is not an option ;)
wvxvw
07-13-2011, 05:40 PM
Some things simply don't exist / aren't possible to get in release player (for example call stack information, since the JITted code doesn't really know what ABC code it's executing, so it will have problems telling you what function erred and what other funciton(s) called it. You could have a JIT debugger installed, but the information it shows is rather cryptic, unless you are that person who wrote the debugger :) However, for logging you could use a technology of your choice to run a listening socket, and use AS logging code to send messages to that socket. You may look into AS / HaXe files that come together with FlashDevelop, they have it functioning. If you happen to program in AS2, then back in the days it was the default way once to log messages from Flash.
die_caro
07-14-2011, 11:21 AM
Believe it or not. I went to the site again today, without any further alterations to my flash file. And today firefox portable with debug player plugin and firebug did all the work they were supposed to do.
I still don't know what happend last time, but seems like firefox portable with plugins is yet a way to debug flash files on any computer :)
martin.heidegger
07-26-2011, 01:04 PM
@Barna Biro: I took over the work on as3commons logging, now it should contain features like "writing files with air", and the documentation is also a lot more detailed.
@die_caro: I wonder what didn't work out when trying as3commons. How did you use it?
josh_ak
08-08-2011, 08:53 PM
I use the Output class from senocular (http://www.senocular.com/flash/actionscript/files/ActionScript_3.0/com/senocular/utils/Output.as). It basically adds a trace window to the main screen. You just have to add an instance to your display, and then call Output.trace() instead of trace()
You can use either monster debugger:
demonsterdebugger.com
or noponies flash to browser console:
blog.noponies.com/2010/07/simple-flash-to-browser-console-logging/
hi, was searching for other thing and arrived here...
i'm not sure about the possibilities, but we can output info to the browser console
import flash.external.*;
var keyboardInput:Object = new Object();
Key.addListener(keyboardInput);
keyboardInput.onKeyDown = function()
{
var keyPressed:Number = Key.getCode();
consoleTrace(keyPressed) ;
}
function consoleTrace(h)
{
ExternalInterface.call("console_trace", h);
}
consoleTrace("hello world");
with this JS
<script type="text/javascript">
function console_trace(w)
{
console.log(w);
}
</script>
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.