« Emotions Projected Into 3D Space | Main | To Blogathon or not to Blogathon? »

How to get Trace output in Flex Builder 2?

This post is really just a question. One that's been puzzling me.

Why is there no built-in output panel that displays trace() results in Flex Builder 2? Is there a setting I should change, and have it functioning the way I'd expect from my years as a Flash-coder? Is it perhaps that Flash-coders were not expected to switch to the Flex Builder for coding? Is there a better tool than trace() in Flex Builder?

Why should I have to do any extra work to get trace() output when developing AS in Flex Builder? While I appreciate the code collapse, and other neat dev tools, trace() is really an important to how I develop code.

**Update: --- Read Comments for answers and explinations
*
* You must use Debug, instead of Run to get trace() output
*

Comments

You should debug application instead of just starting it. I think that debug is default way of starting apps in flex (f11 - debug, shift+f11 - run)

Try launching flex in debug mode and trace statements show up fine.

You are kidding, right?

I mean, debug mode is AWESOME in Flex Builder. If you have the Flash 9 Debug Player installed and click the little bug in the tool bar, you'll get to see all the power of true debugging that Flash has always been missing -- and that all other serious IDEs have had for years.

The most minor of these features is trace (which ONLY works when you are in Debug Mode) and you see trace output in the console window.

The Debugger is going to be open-sourced later this year. I can't wait to see what features developers will be adding to it!

I might be missing your question, but there is an output of the trace commands in Flex builder 2. You have to run in Debug mode and have the debug version of the Flash Player installed and then your trace output is captured in the Console pane of Flex Builder.

The debugger in Flex is way more powerful (and easier to use) than in Flash, with perhaps a slightly steeper learning curve, but it's worth it. To be able to run my app and peer inside of it as if I were running XRay natively in the IDE is a godsend. I love Eclipse/FB!

Trace statements can be seen, as per usual, in the Console view.

Wow! That was a fast response!

ugh! These little differences between Flash and Flex dev are frustrating. My habit in Flash is to hit Ctrl-Enter to run/test my code. Now in Flex Builder it's Debug *not* Run.

So, what's the keyboard shortcut for Debug in Flex Builder?

By the way, I'm going to keep posting these apparently stupid questions. I can't be the only one who is trying to figure this all out.

I request, however, that people check their ego at the door. Calling things "serious" implies that everything else is not. I have a feeling that lots of folks are afraid to ask questions like this, for fear of looking stupid.

Hit Ctrl-Shift-L or go to the menu option Help > Key Assist... to see all keyboard shortcuts.

Debug is F11; Run is Ctrl-F11?

tail -f the log file and you can see all trace statements while not running in debug mode.

You have to look at the 'Console' which is where trace outputs will appear. You also must be debugging for this to work properly.

Switch to debug mode in FB2 and you will have trace output panel visible.

1. Menu > Window > Console

2. Run SWF in Debug mode for trace output.

The other option is to open the "Flex Debugging" Perspective. It is the toogle button in the top right corner of Flex Builder.

Woot!

Ted :)

trace()will show in the console when you run the debugger instead of the run command.

Hm, funny thing is that you can get trace output even without FB. All you need is debug flash player and FlashTracer extension. It works in Firefox. I guess one can do something similar in other browsers.

Click the little Bug icon in Eclipse.

But true, the Debug mode is awesome and you never want to work in the Flash IDE again. I fell in love with breakpoints. They make trace commands most of the time obsolete.

I only wish the debugger was stable with the Apollo :(

i think this is the answer to the initial question. you can use the flex debugger fdb from the command line.

example.
fdb