&& inside your global Header file #DEFINE DEBUGOUT DEBUGOUTX && debugoutx.prg LPARAMETERS lnParam1, lnParam2, lnParam3, lnParam4, lnParam5, lnParam6, lnParam7, lnParam8, .... && up to 25 (max. no of parameters VFP supports) LOCAL xj, lcCommand, lcLog, lValue IF _VFP.StartMode = 0 && in Development environment m.lcCommand = 'DEBUGOUT ' FOR m.xj = 1 TO PCOUNT() m.lcCommand = m.lcCommand +IIF(m.xj >1,',','') + 'm.lnParam' + ALLTRIM(STR(m.xj)) ENDFOR EVALUATE(m.lcCommand) ELSE m.lcLog = '' FOR m.xj = 1 TO PCOUNT() m.lValue = TRANSFORM(EVALUATE('m.lnParam' + ALLTRIM(STR(m.xj)))) m.lcLog = m.lcLog + IIF(m.xj > 1, ', ','') + m.lValue ENDFOR STRTOFILE(m.lcLog, 'yourfile.log', 1) && you can also read out the current SET DEBUGOUT setting to determine the logfile ENDIF && untested code .. but you should get the idea and can fix it if necessary ...Regards