Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What line of code is being executed?
Message
De
11/07/2002 07:15:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
11/07/2002 04:44:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00677430
Message ID:
00677448
Vues:
16
>Here's the scenario:
>
>An exe with no GUI occasionally appears to hang.
>
>There is no error, otherwise the error-handler would kick in, write a message to a log file and quit.
>
>There is no screen output in the program.
>
>VFP is not installed.
>
>Is there a simlpe way to log something like 'Currently executing line x of program y' to a logfile?
>
>TIA

You would have to insert checkpoints in suspicious places, for instance:
WriteLog("Checkpoint 1.1")
Suspicious_Code()
WriteLog("Checkpoint 1.2")
More_Suspicious_Code()
WriteLog("Checkpoint 1.3")
...
function WriteLog(tcText)
  StrToFile(tcText, "MyLog.txt", .T.)
endfunc
If you have an older version of VFP (before version 6), search the download section for StrToFile.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform