Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compiler directive only for dev time
Message
De
17/09/2014 09:33:08
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
17/09/2014 09:21:29
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01607627
Message ID:
01607723
Vues:
58
>Hi Mike.
>Not the best approach but I think that this will help...
>
>#If File(Sys(2004) + "vfp9.exe")
> * Development mode
>#Elif
> * Run time
>#Endif

Hm, this will work only if you compile something at runtime.

My solution is to set a constant. Something like
#DEFINE dlDebugMode = .t.
in a global / general header file

in your main.prg do
#IF dlDebugMode THEN
*only compiled in if dlDebugMode
 IF _VFP.STARTMODE#0 THEN
  messagebox('debug')
  return
 ENDIF
ENDIF#
anywhere where you need code at debug time only
#IF dlDebugMode THEN
*only compiled in if dlDebugMode
 your debug stuff
#endif
don't miss to compile without debug information!

HTH

Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform