At some point, you’ve probably hit a bug that you can only reproduce on a remote machine (perhaps a testing/staging or production server). Here are some simple instructions on how to debug your SWF remotely:
- Open the Debug Configurations dialog. In the toolbar, click the Debug button and choose Other…. From the menu, choose Run > Debug > Other…
- Create a new Debug Configuration for your project. Click the new icon in the top left. Choose your project and the application MXML or ActionScript file.
- Specify the URL of your SWF or HTML file. Uncheck “Use Default” under “URL or path to launch”. Enter your URL.
You can still use all the debug features you would normally use locally. A great trick to demo here is using conditional breakpoints to modify your application at runtime:
- Create a breakpoint
- Right click on the breakpoint, select Breakpoint Properties
- Check enable condition
- Enter a valid expression, e.g. this.mySprite.rotationZ += 10
- End the expression with: “, false”
Normally you would use conditional breakpoints to suspend when a condition is true. The trick here is that evaluating an expression can have intended/unintended side effects. In this case, we can string together a comma-separated list of expressions and never suspend the application since the expression will always return false.Share on Facebook