7 Replies Latest reply on Jul 28, 2010 4:30 PM by tcorbet

    trace() output from browser-launched AIR app?

    koolawe
      AIR app is launched from browser badge with parameters. How to get the trace() output to a console window or to flashlog.txt ?
      Thanks,
      K.
        • 1. Re: trace() output from browser-launched AIR app?
          Admiral_Brodnack Level 1
          Your AIR app could write it's own log file, or open a window to display the text. You would have to write your own trace-like function.
          • 2. Re: trace() output from browser-launched AIR app?
            Oliver Goldman Adobe Employee
            The trace() facility doesn't work any differently when the app is launched from the browser vs. any other mechanism. To get trace output to a file, you must configure mm.cfg appropriately.

            Oliver Goldman | Adobe AIR Engineering

            • 3. Re: trace() output from browser-launched AIR app?
              tcorbet Level 1

              OK, Oliver, or someone on the team,  it seems like it is time to update your post.

               

              As far as I can determine, with AIR 2.0, there is very definitely a different behavior for tracing.  Even with a debug version of an AIR app, all of the previous tools which supported our debugging by monitoring [Arthropod, FlashTracer, etc.] of the file named in mm.cfg as the location for the flashlog.txt are failing.  Only if the app is launched by the ADL is it possible to intercept the trace output.

               

              Please proivde current best practices or we will all keep Googling ourselves to death trying to detrmine a solution.

               

              Thank you.

              • 4. Re: trace() output from browser-launched AIR app?
                chris.campbell Adobe Employee

                From what I understand, trace output is only officially supported when running under ADL.  However, I was able to get trace statements printing out to the default file (/Users/ccampbel/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt) after I put a 0 byte file named "debug" in my appname\META-INF\AIR directory.

                 

                I am running on OS X, and I put my mm.cfg file into

                /Users/ccampbel/Library/Application Support/Macromedia/mm.cfg

                 

                With symbolic links in:

                /Users/ccampbel/mm.cfg

                /Library/Application Support/Macromedia/mm.cfg

                 

                I used the symbolic links just to be sure I had my bases covered.

                 

                Hope this helps,

                Chris

                • 5. Re: trace() output from browser-launched AIR app?
                  tcorbet Level 1

                  01.  It indeed helps very much, thank you.

                   

                  02.  I was working heavily with SDK 3.3 and AIR 1.5, but have not been so

                  involved for the last 10 months.  Of course my memory is a little rusty, but

                  they have also thrown down the ASK 41. and AIR 2.0.2 stuff indicating that a

                  lot changed under the covers from the Gumbo testing environment to today.

                   

                  03.  I specifically DO NOT recall having to create a debug file, but it

                  absolutely works both for older code layng aorund from that test environment

                  and for the most current test running under the latest release.   So, thanks

                  very much -- where was the the 'debug file/flag' technique mentioned?

                   

                  Terry

                  • 6. Re: trace() output from browser-launched AIR app?
                    chris.campbell Adobe Employee

                    Hi Terry,

                    I've been asking around and am told we've never publicly supported trace statements without using ADL.  The "debug" file is very unofficial, and shouldn't be counted on going forward.  However, I see how it can be helpful and I'd like to recommend adding a feature request on AIR's ideas.adobe.com page.  Please let us know if you do so others can vote on it.

                     

                    Chris

                    • 7. Re: trace() output from browser-launched AIR app?
                      tcorbet Level 1

                      OK, I just fell into it, but I don't want to fall out of it.  I think I

                      first found that I could quite nicely debug AIR when I was using

                      Alessandro's FrlashTracer plug-in for Firefox around 2007.  Then Arthropod

                      became the attractive alternative.  With both of them, while the integration

                      was not perfect, it worked, and it definitely gave me fast turn arounds in

                      code/compile/test cycles.

                       

                      So, I hope we can make sure no one will turn off the spicket.  I poseted an

                      'idea request' a couple of minutes ago providing some rationale that a

                      product manager could use to point out a productivity feature that 'the

                      other guys' don't have!