I just verified that my technique as previously described works regardless of whether my AIR’s .swf file is debug or release. In release builds, I don’t see trace output in flashlog.txt, and I no longer see line numbers in my stack trace. Whew…I got nervous when I realized I was running debug swfs in last night’s tests, and am relieved to see that it still works.
Also, I verified that the Windows VM that I am testing on does not have the debug Flash player installed. That was another thing that occurred to me today as a potential hitch in the plan. I don’t know how AIR interacts with the installed Flash player, if at all, but I thought for a moment that in order to do logging, perhaps AIR required a debug version of Flash to be running. Nope!
So, who can tell me where I should put the code to check the log file to see if it’s been updated? I’m assuming some sort of timer so that I can check its modified date on a regular basis? If I see it’s been updated, I read it and see if there are any Error messages to be reported. I guess this approach might be strange if the computer on which my AIR app is one with the existing debug Flash runtime, and a developer who is already logging to that file. I’ll have to verify that the error written to the log file is mine before popping up the error dialog.