Live remote debugging feature built right into Flex
I just ran into a very sexy Flex Builder feature for debugging live remote code. Previous to finding that Flex can actually debug live remote applications, I used the Flash Tracer plugin. Not that Flash Tracer isn’t a great plugin, its just that debugging by printing a crap load of trace statements is kind of like trying to wash your car with a toothbrush. Yeah, you can do it; but it sucks.
Anyways, to debug a remote SWF all you need to do is upload it to your site, then enter the uploaded URL link (to the HTML page that is the front end to the SWF) in the run configurations properties of Flex Builder. You can navigate in the Run menu item at the top and click on the Run or Debug sub menu, followed by clicking the option named Other.

Or you can click either the Run, Debug or Profile options from the icon bar directly below Run menu, and click the option named Other.

Then in the launch paths section, uncheck the use defaults check box and paste in the URL to your remote application in the debug URL text box.

Its helpful to have an ftp program running in the back end as you update your code, since every time you update your SWF locally, even if its just new debug points, you’ll need to re-upload it. One of the cool aspects of Flex is that you don’t actually have to hit the Debug button to update the SWF, after you change it you’ll notice that the SWF is updated. This will actually show trace statements to the Flex console and catch debug points on a remote SWF, way nicer than Flash Tracer, so long as you’re working on a Flex project. Happy debugging!
3 Responses to “Live remote debugging feature built right into Flex”
Leave a Reply
Leonard on August 8th, 2008
Nice feature. I’m uploading the debug version to the server but the Debugger menu item in my Flash Player is grayed out and isn’t connecting back to Flex. Any suggestions?
crebstock on August 9th, 2008
The first thing to check would be to ensure that you are uploading the debug version and not the release version. Thats probably not too likely since every thing you export in flex is debug unless you specifically do a release build.
One other thing that can throw you off is the correct link. So make sure you link to the html and not the flash file. Also, try to add the ?debug=true to the end of the html link and see if that helps.
scruffpuff on November 17th, 2009
This is such a great find! I was trying to debug a site the other day with Flash Tracer and it’s been a nightmare. Thank you for posting this!!!