You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Debugging Flex Applications with RSLs or runtime locales

Debugging a Flex application is easy as long as the SWF is self contained. If however your application makes use of Runtime Shared Libraries (RSLs) or runtime locales you are going to have trouble. 

The reason for this trouble is that the application SWF is expecting other resources to be located relative to itself. In a normal multi-module build the SWF will however reside in its modules "target" directory without any of the dependencies. As soon as you try to start the application it will fail to load the related resources. In order to work around this debugging the SWF in the final application WAR was an option.

With latest changes in Flexmojos 7.1.0-SNAPSHOT however a new option has been added to the toolbox.

The "copy-flex-resources" goal, which initially only worked in WAR projects, was modified to also work in SWF projects. In contrast to the WAR version, the SWF version doesn't iterate over all SWF dependencies, but uses itself as root.

<plugin>
    <groupId>net.flexmojos.oss</groupId>
    <artifactId>flexmojos-maven-plugin</artifactId>
    <version>7.1.0-SNAPSHOT</version>
    <extensions>true</extensions>
    <executions>
        <execution>
            <id>copy-test-resources</id>
            <goals>
                <goal>copy-flex-resources</goal>
            </goals>
        </execution>
    </executions>
</plugin>

By defining the above execution, Flexmojos will automatically dump all related resources to the "target" directory, enabling the developer to directly debug the created SWF.

This is a very new feature and hasn't been testes as much as the other features ... so if you are having problems, feel free to report them on the Flex mailing lists and we'll get the problems sorted out as soon as possible.

  • No labels