Is there any way to get Flex Builder to connect to an existing browser session running Flash Player Debugger? I can connect to FDB like this, but with Builder I need to click Debug and rush to close the newly opened browser window before it loads the Flash file and then go back to the session I want to connect and right click it to start the debugger. Unfortunately this is not very reliable as I can't always beat the window opening, requiring several attempts before being able to connect to the session I am interested in. If I could just tell Builder 'Start debugging' and then have it wait for the connection, I could now calmly go over to the browser, right click, hit debug, provide the IP and voila. This would allow me to inspect variables on a hard to replicate bug on a session running on a tester's computer.
views:
477answers:
3If you configure the launcher of your debug session to be a web page without a Flash movie on it, FB will just wait to for a debugger player to connect. To do this: press the arrow next to the Debug Icon in the toolbar, select "Other". Uncheck the "Use Default" in the URL or path to launch area. Put in a URL that doesn't have a debug movie in it. Then just navigate this browser to where the debug movie actually is.
To address your biggest problem first, have you heard of the Flash Log file? This will let you see the traces without actually having to use the Debugger. See instructions here:
http://blog.flexexamples.com/2007/08/26/debugging-flex-applications-with-mmcfg-and-flashlogtxt/
Now as a more direct approach...
This is hackish and there is probably another way, but it does solve the problem.
Have you thought about changing your publish settings? This would prevent the current swf from loading, and then you could have an additional fifteen seconds or so to go to the window you'd like.
Go to the debug menu (probably the fifth icon from the left), and then
go to Debug Configurations.
Uncheck "Use defaults"
change the Debug URL to one which does not include the swf.
When you run the debugger, it should now wait for another couple dozen seconds before it times out.
As mentioned in the other answers, you can modify the launch configuration to refer to any URL that doesn't contain a SWF; but I just wanted to add that you can also use the URL "about:blank", which has the advantage that (as of Flash Builder 4) Flash Builder won't even bother opening a browser page -- it will just start listening on the socket.
-- Mike Morearty, Flash Builder team