Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: lemmy101 on Sat 26/04/2008 18:24:30

Title: detecting debug mode
Post by: lemmy101 on Sat 26/04/2008 18:24:30
Hi all. Is there a way of detecting whether you are running the game thru the actual debugger?

I tried:

#ifdef DEBUG

but that only seems to work on the General Settings "Enable Debug Mode" and has nothing to do with whether you're debugging the script or not.

Reason I ask is at the moment AGX is not working in debugging as the working directory of the game is different. So I want to modify the path of loaded files to match.

Any help would be much appreciated! :)

Thanks!

lemmy
Title: Re: detecting debug mode
Post by: Rui 'Trovatore' Pires on Sat 26/04/2008 20:35:53
You mean apart from

if (game.debug_mode) {}
if (!game.debug_mode) {}

? Or whatever the proper spelling and function name might be.
Title: Re: detecting debug mode
Post by: lemmy101 on Sat 26/04/2008 22:43:26
yup. That's the thing that detects if your debug hotkeys etc are enabled. I need some way of detecting if the game has been run with Run instead of Run without Debugging.

Cheers!

lemmy
Title: Re: detecting debug mode
Post by: Rui 'Trovatore' Pires on Sat 26/04/2008 22:44:15
Aaaaaaahhhhhhhhhh, right. Sorry 'bout that.
Title: Re: detecting debug mode
Post by: Pumaman on Sun 27/04/2008 17:11:59
I don't think this is currently possible ... I'll see about adding something to the plugin API to allow this.