Some Pixels en / pt

How to develop and debug Flex on Google Chrome

Developing and debugging Flex applications on Google Chrome sometimes can be a little tricky, but I will show you here how to solve this common problems.

Configuring Eclipse

First, you have to configure Eclipse. Open Preferences > General > Web Browser and select "Use external Web Browser". Then, click on "New" and add "Google Chrome" using the following Location:

/Applications/Google Chrome.app/Contents/MacOS/Google Chrome

Your configuration should look like this:

Eclipse Google Chrome Configuration

If you are using Windows, you should click "Browse..." and find your Google Chrome application .EXE file.

Debug Flash Player

Google Chrome have it's own Flash Player, so even if you download the debugger version, you may have problems to debug. So first, if you don't have the debugger version, download it.

If you already downloaded and restarted Google Chrome, open this URL:

about:plugins

You may notice that you have two versions installed and one version "Location" is inside Google Chrome's directories. So, you have to Disable this version and keep the other I've just installed. It should look like this:

Google Chrome Plugins

Update: If you can't disable plugins, download the Google Chrome development version here.

After that, right click any flash content and look for the option "Show Redraw Regions". If you have this option, you're using the debugger version.

Cache Problems

If you keep refreshing your application all the time, you may have some problems with caching. And, since I don't think Chrome have some quick setting to disable cache, I've created a simple application that will launch Google Chrome with some command line parameters that temporarily disable cache.

To use it, download the application, unzip it and move the app to the Applications folder. Then drag the icon to the Dock, if you want quick access:

My Mac Dock

Notice that, since Google Chrome will keep only one initial instance, you have to launch it using my app at the first time if you want no cache. If Chrome is already running, it will still keep caching files. If you want your cache back, just quit and open Chrome using the regular app icon.

For windows users, I think you can copy your regular Google Chrome shortcut, right click the copy, select Properties, and add this command line parameters:

--disk-cache-size=1 --media-cache-size=1

This beautiful black Chrome icon was created by GreasyBacon. Don't forget to check his other works.

Conclusion

That's it! The only problem that I'm still trying to solve, is when you use the option "Find in Language Reference". It will not open! If I find some solution, I will update this post. Do you know how to solve it? Leave a comment!

Cheers.