I work on a game in JavaFX, and from time to time I send people a compiled game to try. Since I'm still in the middle of development, I have several pieces of code dedicated exclusively to development / debugging.
One example is the gamespeed slider, which is very useful for me during testing, but it is VERY buggy and can only be used in a certain way - in other ways, I donβt want this code to be in test versions,
What are the best ways to remove such code?
- Surround code with if (Config.DEBUG) (setting a parameter in code)?
- Using if (), but setting a parameter in different build configurations?
- Can SVN branches save code like this? Or do I need to upgrade to Git?
- Can annotations be used for this?
source
share