How to debug Flash / Flex in two browsers?

I have a Flex 4 application that connects to an ASP.NET FluorineFx based web service. It is authenticated by cookie via RemoteObject.setCreadentials()

Both applications connect to the FMS server and talk to each other through a direct RTMFP (P2P) connection.

I want to debug both instances of this application in Firefox and Internet Explorer at a time with one click (F11).

Now I can debug in only one browser by running Debug in Flash Builder 4. I created a double browser with the bat file registered as the default browser in Preferences > General > Web browser , which looks like this:

 start "IE" /b "c:\Program Files (x86)\Internet Explorer\iexplore.exe" -private %1 start "FF" /b "c:\Program Files (x86)\Mozilla Firefox\firefox.exe" -private %1 

But this only binds the debugger to the first launch of the application instance in Internet Explorer.

How to connect and debug both instances?

Thanks.

+4
source share
2 answers

Ok, solution found. It doesnโ€™t work exactly with one click, but two clicks, but itโ€™s better than changing the default browser twice for each debugging session.

Put this code in bat or cmd file and set it as default browser ( Preferences > General > Web browser , New... )

 @echo off IF EXIST ff.lock GOTO runie IF NOT EXIST ff.lock GOTO runff :runie START "IE" /b "c:\Program Files (x86)\Internet Explorer\iexplore.exe" -private %1 DEL ff.lock GOTO end :runff START "FF" /b "c:\Program Files (x86)\Mozilla Firefox\firefox.exe" -private %1 ECHO lock > ff.lock GOTO end :end 

... and double-click "Debug"! It launches two browsers and attaches a debugger to them!

Note. If you are using Windows Vista / 7 with UAC enabled, you may need to run Flash Builder as an administrator (so that the script file is written to the ff.lock file).

+6
source

I have never tried, but I assume that you need to run the second instance of Flash Builder and attach the debugger to the second instance of the application. In this case, the article "FlexBuilder 3 Attach to Runing to Debug" may be useful.

+1
source

All Articles