Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Checking whether the game is running in "debug mode"

Author
Message
gosukiwi
AGK Tool Maker
3
Years of Service
User Offline
Joined: 24th May 2020
Location: Argentina
Posted: 1st Jun 2020 02:09
So the IDE provides a DEBUG button, which works great when you want to debug things and print things to the IDE's console. I'd like to know whether my app is running in that mode so I can execute some code only if that's the case.



I could set a flag but it can be easy to forget to turn it off when compiling the game for the final user. Is there a way to check if the game was ran with DEBUG MODE?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Jun 2020 02:46 Edited at: 1st Jun 2020 02:56
I have added a request for this on GitHub here. Maybe you could give it a thumbs up
Meantime i use a constant (#constant DEBUG 1)

gosukiwi
AGK Tool Maker
3
Years of Service
User Offline
Joined: 24th May 2020
Location: Argentina
Posted: 1st Jun 2020 02:53
Thanks! I replied on GitHub, hopefully we'll get that feature
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Jun 2020 02:55
I just had a bit of an epiphany on this issue: On windows at least you could check if GetWritePath() contains the word "Windows". This would signify that the app is running in debug
gosukiwi
AGK Tool Maker
3
Years of Service
User Offline
Joined: 24th May 2020
Location: Argentina
Posted: 1st Jun 2020 23:17
Huh, interesting! That would be one way to do it

Still doesn't replace having a proper function for that but it's a great temporary solution. I think I'd rather just have a flag ATM though.

Login to post a reply

Server time is: 2024-04-24 22:00:44
Your offset time is: 2024-04-24 22:00:44