The Debugger tag allows debugging your Mate code (EventHandlers and sub-handlers blocks, MessageHandlers, etc). When using this tag, you specify a level of debugging, which will filter the type of messages you see.

It is recommended that you remove this tag from your code when you are ready to deploy. Its use during production will impact performance if you enabled the debugging in many objects (ie: in many EventHandlers) or if you specified a low debugging level such as ALL or DEBUG.

<mate:Debugger level="{Debugger.ALL}" />



Provides access to the level the debugger is currently set at. Value values are:

  • Debugger.FATAL: designates events that are very harmful and will eventually lead to application failure
  • Debugger.ERROR: designates error events that might still allow the application to continue running.
  • Debugger.WARN: designates events that could be harmful to the application operation
  • Debugger.INFO: designates informational messages that highlight the progress of the application at coarse-grained level.
  • Debugger.DEBUG: designates informational level messages that are fine grained and most helpful when debugging an application.
  • Debugger.ALL: intended to force a target to process all messages.

18 responses so far

  1. Three questions:
    1a. Can you explain how badly will performance be hit if these tags are not removed before deployment?
    1b. If I use a level of ERROR, and no log output is produced, then do I still get the same performance hit as when this tag commented out or removed?
    2. Is there an easier way to turn them on/off either at runtime or before compiling? ie. instead of removing all such tags. eg. consider debugging of a stable code branch with 5 or say 10 event maps.
  2. Hi Emmet,
    If you only have it set to show errors, then the impact will probably not be too big.
    You can also have only one Debugger tag in the main Application file, instead of one per event map. That would make it easier to remove when creating the production swf.
  3. Thank you!
  4. HI,
    I am a mate newbie-... so be patient.
    I have just made a small example using the stpckQuotes example as template.
    My issue is that look like eventMap do not collect my event and I cannto see debug info in any place.
    I do not see any debug panel or similar.
    Event eclipse console do not show nothiing ...

    Any suggestion??


    Andrea Campolonghi
  5. Andrea, I'm new to this too. Re. debugger output, this is my attempt to explain the basics.
    1) FB3 console only displays trace() output if you run the program in debug mode.
    2) You need a debugger tag at the event level of your map, or "higher" up the display list if you have many.
    3) The tag objects (and their children) you wish to debug have to have their property debug="true".
    4) The activity you want to see debugger output has to actually happen. eg. For EventHandlers, the correct Event() type value being dispatched and listened for. btw "type" is a silly property name IMO. It's really the event name string. Event class type only matters when passing data as event object properties.
    5) Lastly, and getting off topic for this Mate tag - if your app has many components, then you need to understand Flash/Flex event flow. Things like bubbling and the concepts of listeners and dispatchers.
  6. Hi Andrea,
    In addition to what Emmet said, I would suggest to make sure that the bubbles property of your event is set to true.
  7. Laura,
    yes. That was the issue. I forgot to leave event bubbling....
    Now is working and .... good job.


  8. How can we set application level config for Debugger? I mean, want to disable debug mode while deploying to production.
  9. When using the debugger tag, what does "Cannot debug" mean for the application?

    A very simple method call with 2 arguments is giving me this message, and I'm curious as of under what conditions the debugger is unable to give a meaningful response (so I can avoid them if possible).
  10. Suri,
    The best is to use the Debugger tag in the main application, then remove it during production.

    That may happen if there is an error in the code you call, but I am not sure why it doesn't show you the whole error.
  11. Thanks for your response Laura,

    I'm sorry that I wasn't clear enough - the code I'm calling is behaving as expected, but the debugger was reporting "Cannot debug". I later figured out what was happening:

    I was testing a method invocation with explicit values (ie: 5, 10), but after I replaced those with variables the debug tag started to work. While I would never use explicit values in real code, it was confusing for a while. So, for anybody reading this, magic numbers for arguments make the debug tag unable to give any meaningful trace.
  12. to Andres: it is Mate bug. try my patched mate ? 0.8.7-de3/

Leave a response

If you need help or want to comment on something not related to this page, please post in the forums. Thanks!

Leave this field empty