Archive

Posts Tagged ‘debug’

Debug vs. Release Build

December 6th, 2008 Gareth No comments

Last week I ran into an issue (or so I thought) with my debugger. I was trying to debug some code on my local machine, but for some reason, the debugger in Flex Builder could not seem to find the SWF that was being built. I would click debug, a new window would open, but nothing happened in my Flex Builder to indicate that it had reached a breakpoint. After playing around with it for a little while, I decided to close out of Flex Builder and reopen it, in hopes that *something* would happen that would indicate why nothing was happening. After restart, and trying to run the debug again, Flex Builder decided to actually let me know what was happening.

In my work environment, my exported release builds and my debug builds are both built to the same spot, which is due to our upgrade process to Flex being an incremental process (from our current HTML + CFM app). In order to add some values to the Flex app, I write them to the HTML page, thus I decided to build them to the same spot. I had not realized at the time that I had exported a release build right before lunch, then when I returned, I was trying to debug the release build. Due to the very nature of the release build, the debug is removed, thus Flex Builder was not able to stop at the breakpoints. For some reason, Flex Builder wasn’t telling me this initially though (even after I had cleaned the project).

My steps to fixing most Flex weirdness (i.e. something isn’t happening that I feel should be happening), is to clean a project first, then restart Flex Builder, if neither of those work, restarting my PC is next. One of those will usually fix the problem :) .