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?

- 4,671
- 6
- 44
- 61
-
2Debugging adds about 9k to the filesize. The flash debug player used to through public errors, but as of around 10+ it only throws the errors into a remote debugging session (nice, but not). I recommend looking into remote debugging from flash if you haven't already. – Jacksonkr Sep 30 '11 at 03:18
-
1If you leave trace()s in it, it may be helpful to you for debugging purpose yes, but it also may be helpful to hackers that are trying to understand your app / game and potentially steal it. That is... if you leaves traces in just about every crucial part of your project. – chamberlainpi Sep 30 '11 at 04:28
2 Answers
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)
- Tested (mxmlc 4.5.1) empty document class in a single line:
- 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
- Very simple test watching the task manager: for loop creating local objects
- 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.

- 28,903
- 6
- 107
- 121
-
2The contained project structure could be the worst if you deliver something which contains `C:\Users\Smecksy133tKillerJoe\retarded clients\screwed\very_unstable_alpha\com\banana\Main.as` and still expect to get paid. – kapex Sep 30 '11 at 07:14
-
thank you! I don't like to expose file paths on my computer but fortunately I use meaningless directory names for my project. Memory consumption and file size are not important for me. So I'm gonna release my app in debug mode. – js_ Oct 03 '11 at 08:41
@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

- 18,402
- 15
- 86
- 123