Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trace() method doesnt work in FlashDevelop

When I put a trace("test"); at the entry point of my flashdevelop project and run it. The application runs fine but I do not see the trace in the output. Below is my code

package 
{
    import flash.display.Sprite;
    import flash.events.Event;

    /**
     * ...
     * @author Anthony Gordon
     */
    public class Main extends Sprite 
    {

        public function Main():void 
        {
            if (stage) init();
            else addEventListener(Event.ADDED_TO_STAGE, init);
        }

        private function init(e:Event = null):void 
        {
            trace("test");
            removeEventListener(Event.ADDED_TO_STAGE, init);
            // entry point
            var game:Game = new Game(stage);
            addChild(game);
        }

    }
}
like image 729
numerical25 Avatar asked Jul 12 '26 21:07

numerical25


2 Answers

If your trying to view the traces in flash develop you need to look under the logs tab, and click start tracking, the traces will then appear in the logs output not the output tab.

http://www.zedia.net/2010/log-trace-log-release-log/

Also allows you to see traces from flash apps running inside a browser :)

like image 179
Tom Avatar answered Jul 14 '26 12:07

Tom


I had this problem, and it turned out that I was testing the project in Release mode instead of Debug. If not in Debug mode, it will not print traces. It's the drop-down just to the right of the Test Project button.

like image 24
felwithe Avatar answered Jul 14 '26 14:07

felwithe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!