What do you use to distinguish between release and development device builds?

I was just looking through the APIs to see if there’s anything nice I can use to distinguish between release and device builds - basically I want to add in development cheats or hacks so I can test features or achievement triggers easily on my device. However I want to make sure that these don’t accidentally get compiled into a release version.

Do people have strategies for coping with that?

I have a bunch of debug variables I keep in a global _debug table.

If I want to use my local machine as a server for my game I would do:

_debug.useLocalServer = true

And then

if _debug.useLocalServer then server = “localhost” end

That type of thing.

At the bottom of my main I have a test if anything in _debug is set to true and if so, prominent yellow “DEBUG MODE” text blinks on top of my app. Did that after making several builds with debug stuff accidentally enabled :slight_smile:

I have a bunch of debug variables I keep in a global _debug table.

If I want to use my local machine as a server for my game I would do:

_debug.useLocalServer = true

And then

if _debug.useLocalServer then server = “localhost” end

That type of thing.

At the bottom of my main I have a test if anything in _debug is set to true and if so, prominent yellow “DEBUG MODE” text blinks on top of my app. Did that after making several builds with debug stuff accidentally enabled :slight_smile: