Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does DebugOut not work when running EXE?
Message
De
16/01/2009 06:12:05
 
 
À
15/01/2009 12:26:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01374117
Message ID:
01374302
Vues:
18
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform