Quick Tip: Debugging Module Inside Non-debug Application

Did you know that it is not possible to debug loaded content within release (non-debug) build app? Every attempt to insert a breakpoint during the runtime will cause null pointer exception thrown by flash builder, however you can still trace() output. To be more specific, imagine you have main application deployed somewhere on the web and you want to debug a module you are just developing wrapped inside the main application. Sure you can use proxy mapping trick + custom run configuration, that would help you run your debugging version of module.swf, however while the main application is non-debug version, the flash builder debugger will just not work correctly. Luckily you have two options to make it work. First, you may also map the main application .swf file for your debug version (+ some flex rsl files) or second option, make the flash player wrap whole content into some .swf compiled in debug mode using PreloadSWF in mm.cfg.

Read the rest of this entry »