2
votes

For some reason trace does not work on when I put trace into my ActionScript files. I use the Flex SDK to build Adobe Air applications. I am currently on Flex SDK 4.5.1 and Adobe Air 2.7.

I have checked that idl is not running, can't find a trace of it ( pun not intended ). I have also added mm.cgf to ~/Library/Application\ Support/Macromedia, that hasn't worked either.

Any other suggestions?

Update: Some suggested my app, so create basic HelloWorld.mxml

<?xml version="1.0" encoding="UTF-8"?>
<s:WindowedApplication
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    title="Hello World">

    <fx:Script>
        <![CDATA[
            trace("Hello World");
        ]]>
    </fx:Script>

    <s:Label
        text="Hello AIR"
        horizontalCenter="0"
        verticalCenter="0"
    />

</s:WindowedApplication>

And HelloWorld.app.xml

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/2.7">
    <id>samples.flex.HelloWorld</id>
    <versionNumber>0.1</versionNumber>
    <filename>HelloWorld</filename>
    <initialWindow>
        <content>HelloWorld.swf</content>
        <visible>true</visible>
        <width>400</width>
        <height>200</height>
    </initialWindow>
</application>

But it still doesn't work. Provided the code, that by some weird chance it could be the app.

1
Have you tried making a dead-simple app that just traces "hello world"? I'd recommend doing that first, if you haven't, because otherwise it may be difficult to discern whether the problem is the tracing or your app. - jimbo
I have tried it and it still doesn't work. - NebulaFox

1 Answers

3
votes

I've solved it. I found it on this website http://forums.adobe.com/thread/761395

I was trying to get trace() to work in Mac. I compiled my AIR app using the flex command line compiler "amxmlc" and included parameters -debug=false and -omit-trace-statements=false. Then i ran the application with adl your-app.xml -nodebug and i was able to get the traces into terminal.