GXS AI: How to debug maps

I believe every GXS AI map developer knows how hard it might be to debug maps. I’m using SEND_SMSG function when I need to debug a piece of code

First of all, I’m using .bat files to run my maps

otrun -at %MAP_NAME%S.att -cs %OT_QUEUEID% -DLOCALE="English_UnitedStates.Latin1@Binary" -DINPUT_FILE=%BASE_PATH%__in.txt -DOUTPUT_FILE=%BASE_PATH%__out.txt -tl 1023 -lg _log.txt -I

this key “-lg _log.txt” tells the translator to use _log.txt for the translation session output. So, every time I’m using SEND_SMSG it writes it’s 1+ params into _log.txt. For example:

SEND_SMSG(1, STRCAT("GID_21_BALQTE_BSD_02_02_2002: ", VAR->GID_21_BALQTE_BSD_02_02_2002_T))

And in _log.txt:

Session [003407] Started: at: Sat Jul 25 09:03:04 2012
--GID_21_BALQTE_BSD_02_02_2002: AAA
--GID_21_BALQTE_BSD_02_02_2002: BBB
Session [003407] ended: err: 0 at: Sat Jul 25 09:03:04 2012

…As always, just an idea 🙂

Gennady Kim