10 Replies Latest reply on Dec 15, 2009 11:36 AM by PhilipKeiter

    Trace doesn't show in debug?

    ehusar Level 1

      Okay I am throwing up my hands in defeat. How the hell do you get traces to show in the Console?  Very simple code here...


      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">


                  private function clickHandler():void
                      trace("Children: "+this.getChildren());


          <mx:Button id="buttonOne" click="clickHandler()" label="Dump Data"/>
          <mx:Label id="labelTwo"/>


      At no time does a trace show in the Console. Why?  I have put traces in other examples and nothing shows in the console.  Grrrrr....

        • 1. Re: Trace doesn't show in debug?
          PhilipKeiter Level 2

          Hello move360media,


          The first step would be to make sure you installed the debug version of the flash player. It doesn't automatically install when you install Flex... The next step would be to make sure debugging isn't disabled on the compiler. But it is turned on by default...




          1 person found this helpful
          • 2. Re: Trace doesn't show in debug?
            ehusar Level 1

            "make sure debugging isn't disabled on the compiler" - where do I check that?  Installed the debug version of the player.  Thanks.

            • 3. Re: Trace doesn't show in debug?
              PhilipKeiter Level 2



              Open the .actionScriptProperties file at the root of the project (assuming FB3) and make sure you don't see debug=false anywhere.


              It is true by default so if you don't see debug anywhere in there than it is turned on by default and debug=true shouldn't help any.





              Message was edited by: Philip Keiter

              • 4. Re: Trace doesn't show in debug?
                ehusar Level 1

                Okay. not sure what I am doing wrong. Can't find a .actionScriptProperties for any of my projects. FB3 on OS X if that matters.  Even searched in Spotlight and nothing.  Some projects are AIR and some are FLEX projects if that make any different.

                • 5. Re: Trace doesn't show in debug?
                  PhilipKeiter Level 2

                  I'm using Windows. The file is probably named differently on a Mac.

                  • 6. Re: Trace doesn't show in debug?
                    msakrejda Level 4

                    I'm on Linux and the file names are the same--since Mac and Linux cores are fairly similar, I would not expect a different file name. Note that the files may not be visible by default since they start with a period. In the console, type 'ls -A' will list all files, including hidden ones. I'm not sure how to get these to show up in Finder--on XP / Linux there's a menu option within Explorer / Nautilus.


                    There should also be a menu option for debug builds. Also, are you launching in debug mode ("Debug" vs. "Run" in FlexBuilder)? I don't think you see console output unless you launch in Debug mode.

                    • 7. Re: Trace doesn't show in debug?
                      ehusar Level 1

                      OS X you can open terminal and type the following to show hidden files.


                      defaults write com.apple.finder AppleShowAllFiles TRUE
                      killall Finder

                      Here is my .actionScriptProperties:

                      <?xml version="1.0" encoding="UTF-8"?>
                      <actionScriptProperties mainApplicationPath="ProjectAlpha.mxml" version="3">
                      <compiler additionalCompilerArguments="-locale en_US" copyDependentFiles="true" enableModuleDebug="true" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersion="9.0.124" htmlPlayerVersionCheck="true" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" useApolloConfig="true" verifyDigests="true" warn="true">
                      <libraryPath defaultLinkType="1">
                      <libraryPathEntry kind="4" path=""/>
                      <libraryPathEntry kind="1" linkType="1" path="libs"/>
                      <application path="ProjectAlpha.mxml"/>

                      enableModuleDebug="true" looks to be okay.  Still can't figure out what no traces showing. And yes I am in
                      Flex Debugging not Flex Development.

                      • 8. Re: Trace doesn't show in debug?
                        paul.williams Level 4

                        Are you able to perform an other debug tasks? For example can you use breakpoints? Can you step through the code? If you throw an error does it get displayed by the player?


                        If you hit the link below does it confirm that you have the debug player installed?




                        Can you get trace statements to go to flashlog.txt?


                        http://elromdesign.com/blog/2009/01/27/tips-debugging-flex-applications-with-flashlogtxt-o n-a-mac/

                        • 9. Re: Trace doesn't show in debug?
                          ehusar Level 1

                          Okay, player is a check.


                          Picture 2.png

                          When I launch in debug I my project runs. Nothing shows in Console at all. No traces. Errors do show if I have any in the console. When I close my project window. The follow pops up.  The rest of the Launch Failed window is just more trace data.


                          Picture 3.png


                          So this window is new. I have not seen that before tonight.  So I can see the traces in that Launch Failed window. Looks like issue is establishing a connection to debugger.  Any ideas?



                          • 10. Re: Trace doesn't show in debug?
                            PhilipKeiter Level 2

                            On Windows, sometimes there is a problem where the last run doesn't terminate properly, and you can't do subsequent debugs because the old instance is in the way. On Windows when this happens, you go into task manageer, processes, and kill the process. Then you can debug again. I haven't heard of this happening on a Mac yet. But this is the leading cause of not being able to establish a connection to the debugger when you have the debugger version of the player installed.