Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What line of code is being executed?
Message
From
11/07/2002 07:15:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
11/07/2002 04:44:54
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00677430
Message ID:
00677448
Views:
17
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform