Search code examples
flashactionscript-3debuggingrelease-mode

Disadvantages to release Flash application which was compiled in debug mode


I want to release my flash application not in release mode but in debug mode to see result of trace() after releasing the app.

I don't care that debug mode makes processing speed little slow.
Except for processing speed, are there disadvantages to release flash application which was compiled in debug mode?

Is it possible that the app throws exception or Flash Players of the app's users crash due to debug mode?


Solution

  • Here a few disadvantages. I made some simple tests that don't really prove anything as they don't tell if it's caused by the different players and whether the additional memory/file size values increase linear or stay at that level. They just show there are differences.

    • Increased file size
      • Tested (mxmlc 4.5.1) empty document class in a single line:
        • -debug=false: 550 Bytes
        • -debug=true: 667 Bytes
      • Adds an additional line number instruction for each line of code (maybe even for each declaration/statement/expression)
    • Contains your project structure: full paths to .as files.
      • possible privacy concern (could show local username)
      • shows internal project name, maybe internal version if used in path
      • probably indicates used OS and/or IDE
    • Increased memory consumption
      • Very simple test watching the task manager: for loop creating local objects
        • debug: ~ 6300k - 7400k
        • release: ~ 5800k - 6900k
    • Slower (as already mentioned in the question)

    I'm not sure if security is an issue here, since trace statements don't reveal anything that couldn't be extracted from memory or reconstructed by decompilation. Maybe the presence of a trace would indicate that it could be a critical part of the application, but in general even non-debug bytecode still contains those trace instructions. Line numbers could be used by a decompiler to create prettier code though.