To debug a screenweaver application in Flex Builder on OSX I do the following:
- In your main screenweaver app, add in a command line parameter (-swf) to specify the swf to use. This will let you specify to load the debug version of the swf.
- Create your ScreenWeaver bundle however you normally do.
- Create a shell file called launch.command (the extension .command is neccessary) next to your bundle
- In launch.command enter in a command to launch the app. I use something like:
/somepath/MyApplication.app/Contents/MacOS/swhx -swf MyApp-debug.swf
- Click the little tiny arrow next to the debug button on your FlexBuilder toolbar.
- Select "Other..."
- Select your application on the left.
- On the right, uncheck "Use Defaults"
- Set the "Debug" line to your launch.command you created
Now, you should be able to debug your application. It should launch in your screenweaver shell and full debugging functionality from Flex Builder should work correctly.
This should work on windows if you replace the .command with a .bat file.
Our Screenweaver app will load a default non-debug swf if no "-swf" parameter is passed. That way the loader doesn't have to change for production vs. debug usage.