Thursday, October 25, 2007

Flex2 connection debugging

Ok, so it took me way too long to find out about this. Flex2 lets you track what' s happening with your remote connections using a tool similar to the Flash Connection Debugger. All you have to do is add <TraceTarget/> after your application tag. After that, when you launch the debug version of your app, you'll see all the traffic going back and forth between flash and your remote amf technology (in my case, ColdFusion). It's a huge help when your app just seems to hang when attempting to connect to a remote service. Too bad it spits its output into the console window instead of the neat little app that ships with Flash. A collapsed panel in the debug view would do just as well. Let me know if there is one and I just haven't found it.

One thing I've noticed that I haven't found a solution for is that the information provided by the TraceTarget tag/object doesn't include information received from your remote service provider. That's going to be a problem with CF since it has a habit of doing things like changing the case of your objects properties or your code is returning a generic object when you had intended for it to be typed.

You can still see the results of the information coming back in the variables panel in eclipse using the debugging perspective, but I got used to the Flash NetConnection debugger where everything was in one place. No big deal, I'm sure we all can get used to a slightly different workflow.

4 comments:

  1. great, can you provide us with a link for documentation?

    ReplyDelete
  2. "All you have to do is add after your application tag"

    add what ??

    ReplyDelete
  3. Doh! Stupid web posting thingy. I put the angle brackets in instead of the entitity references. It should be fixed now.

    ReplyDelete
  4. One of my best friends is ServiceCapture, it's been a life saver for watching traffic to CF.

    http://kevinlangdon.com/serviceCapture/

    ReplyDelete