Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does DebugOut not work when running EXE?
Message
From
16/01/2009 06:12:05
 
 
To
15/01/2009 12:26:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01374117
Message ID:
01374302
Views:
23
Hi,

This might be helpful since you don't have to replace your existing code
&& 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
Christian
Previous
Reply
Map
View

Click here to load this message in the networking platform