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?

有帮助吗?

解决方案

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.

其他提示

@kapep 's answer is right about the things debug mode does to your swf.

but it's not neccessary to use debug mode for traces - compile in release mode and use a different debugging tool like

and maybe use a logging framework to also use normal trace statements as well as the ones that are catched by the external logger.

i can recommend this one here: parsley+spicelib

here's a short manual: http://www.spicefactory.org/parsley/docs/2.0/manual/logging.php#intro

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top