How to connect Flex Builder debug session to standalone SWF
I ran into a scenario where I had a swf loading inside a .NET shell and needed to leverage the Flex Builder debugger. The issue I was trying to debug was related to this particular deployment scenario so running the Flex app on it’s own in Builder was not an option.
Here’s the trick. In Builder select “Debug …” and create a new entry under “Flex Application”. Nuke the default values under “URL or path to launch” and enter a bogus URL like “http://localhost/foo.swf”. Now click “Debug” at the bottom right of the dialog box.
A browser window will open and you’ll get a 404. That’s fine. Switch back to to Builder and take a look at the Debugger perspective. You’ll see a debug session has kicked off but no swf has been loaded. (which makes sense since we provided a bogus entry). Now launch your standalone swf, or in my case the windows executable that contains my swf. Remember, you still need to run the debug version of your compiled swf in order for this to work!
Once your swf is loaded take a look at the debugger. You should see it has linked the debug session! Now you can step through or trace till your heart’s content. Not the most elegant solution but hey, it works.



Thanks! this problem was driving me crazy. now i can sleep at night.
Really cool stuff… to get going…
[...] great post talks about how to connect Flex Builder debug session to standalone SWF. I know a lot of people will be [...]
Happy New Year… « FLEXing My Muscle said this on January 2, 2008 at 5:50 am
SOG knives…
Interesting ideas… I wonder how the Hollywood media would portray this?…
SOG knives said this on July 17, 2008 at 4:12 pm
Thanx!!
IOU one for this….
Nice. Great tip!
Thanks very helpful, no more alert boxes.. yay! haha
This is quite a up-to-date info. I’ll share it on Digg.
p.s. Year One is already on the Internet and you can watch it for free.
Just link the “foo.swf” to the “*.exe or .app” binary and Flex will launch the application for you.