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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s