Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coverage Profiler and Event Tracking During Runtime
Message
De
18/01/2006 12:54:46
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Coverage Profiler and Event Tracking During Runtime
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01088083
Message ID:
01088083
Vues:
88
DISREGARD. I just realized that this customer is using the version of our app compiled in VFP8, not VFP9. The coverage profiler doesn't work in runtime mode in vfp8. The coverage profiler appears to work fine in the app compiled in VFP9 in runtime mode.





I have a customer who is having problems that cannot be duplicated and does not occur anyplace else except at their site. We have literally hundreds of customers and these problems only occur at this one location. I need to use the coverage profiler or event tracking to produce a log of all events and actions and program flow that occur when the problem happens. Do either or both work in runtime? Will

SET COVERAGE TO myfile.txt && just an example
SET EVENTTRACKING TO myevents.txt && or whatever I use
SET EVENTTRACKING ON

*program runs

SET COVERAGE TO
SET EVENTTRACKING OFF


work in runtime to create the files?

Why doesn't the below work in the init of a form during runtime?
IF TYPE('ag_code') = "N" .AND. INT(ag_code) = 5180	&&erwin
   =ADIR(testfiles,tdir+"COV_*.TXT")
   IF TYPE('ALEN(testfiles,1)')='N'
      FOR ifiles = 1 TO ALEN(testfiles,1)
         IF TYPE('testfiles(ifiles,1)') = "C" .AND. FILE(tdir+testfiles(ifiles,1))
            IF testfiles(ifiles,3) < DATE()-1
               DELETE FILE (tdir+testfiles(ifiles,1))
            ENDIF
         ENDIF
      ENDFOR
   ENDIF
   =ADIR(testfiles,tdir+"EVT_*.TXT")
   IF TYPE('ALEN(testfiles,1)')='N'
      FOR ifiles = 1 TO ALEN(testfiles,1)
         IF TYPE('testfiles(ifiles,1)')="C" .AND. FILE(tdir+testfiles(ifiles,1))
            IF testfiles(ifiles,3) < DATE()-1
               DELETE FILE (tdir+testfiles(ifiles,1))
            ENDIF
         ENDIF
      ENDFOR
   ENDIF
   covgfile = tdir+"COV_"+PRODUCER+"_"+ALLTRIM(STR(ag_code))+"_"+LEFT(TTOC(DATETIME(),1),12)+".TXT"
   evntfile = tdir+"EVT_"+PRODUCER+"_"+ALLTRIM(STR(ag_code))+"_"+LEFT(TTOC(DATETIME(),1),12)+".TXT"
   SET COVERAGE TO (covgfile)
   SET EVENTTRACKING TO (evntfile)
   SET EVENTTRACKING ON
ENDIF
This doesn't create the file in runtime either:
IF TYPE('ag_code') = "N" .AND. INT(ag_code) = 5180	&&erwin
   =ADIR(testfiles,tdir+"COV_*.TXT")
   IF TYPE('ALEN(testfiles,1)')='N'
      FOR ifiles = 1 TO ALEN(testfiles,1)
         IF TYPE('testfiles(ifiles,1)') = "C" .AND. FILE(tdir+testfiles(ifiles,1))
            IF testfiles(ifiles,3) < DATE()-1
               DELETE FILE (tdir+testfiles(ifiles,1))
            ENDIF
         ENDIF
      ENDFOR
   ENDIF
   =ADIR(testfiles,tdir+"EVT_*.TXT")
   IF TYPE('ALEN(testfiles,1)')='N'
      FOR ifiles = 1 TO ALEN(testfiles,1)
         IF TYPE('testfiles(ifiles,1)')="C" .AND. FILE(tdir+testfiles(ifiles,1))
            IF testfiles(ifiles,3) < DATE()-1
               DELETE FILE (tdir+testfiles(ifiles,1))
            ENDIF
         ENDIF
      ENDFOR
   ENDIF
   covgfile = FULLPATH(tdir+"COV_"+PRODUCER+"_"+ALLTRIM(STR(ag_code))+"_"+LEFT(TTOC(DATETIME(),1),12)+".TXT")
   evntfile = FULLPATH(tdir+"EVT_"+PRODUCER+"_"+ALLTRIM(STR(ag_code))+"_"+LEFT(TTOC(DATETIME(),1),12)+".TXT")
   SET COVERAGE TO &covgfile
   SET EVENTTRACKING TO &evntfile
   SET EVENTTRACKING ON
   IF SET('DEVELOPMENT') = "ON"
      =OKAY('Coverage is set to: '+CHR(13)+FULLPATH(covgfile)+CHR(13)+'Eventtracking is set to: '+CHR(13)+FULLPATH(evntfile))
   ENDIF
ENDIF
Although I do see the messagebox that is created using OKAY() and it displays the correct value of:

c:\profiiler\tmp\COV_ATI_5180_2006181414.TXT

which should be the file that is created running the exe.

Any ideas? Am I missing something obvious?

From MSDN online:

You can use SET COVERAGE at design time and at runtime in Visual FoxPro 9.0. Coverage.app, the Coverage Profile application included with Visual FoxPro, cannot be included with your distributed runtime applications. See Distributable and Restricted Visual FoxPro Features and Files for more information about files and applications that can be included with your Visual FoxPro distributed applications.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_foxhelp9/html/69db76fd-c964-46b4-b848-c81c02b0f08a.asp
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform