Document Code

The place to discuss FoxPro issues not directly related to ProMatrix.

Document Code

Postby btiguy » Thu Apr 09, 2015 12:26 pm

How can I record the sequence of code lines within a form? There is a bug in an .exe at my clients location and I can't duplicate the error on my development computer. So, I'd like to record the code lines to a file so I can see what might be happening. I don't find the coverage command helpful...too much info. I just want the code sequence.
TIA
Don
btiguy
 
Posts: 455
Joined: Mon Jun 21, 2010 4:03 pm

Re: Document Code

Postby Bob » Fri Apr 10, 2015 3:13 pm

Have you had a chance to look at the error logs? Your client can send copies of the three error log files.
Bob
 
Posts: 718
Joined: Mon Jun 14, 2010 6:53 am
Location: Near Albany, NY

Re: Document Code

Postby btiguy » Sat Apr 11, 2015 10:59 am

I suspect the problem is program logic, not a syntax error. The code was written 20 years ago and has turned into spaghetti code. It was not developed in VPME. I'm trying to get my client to convert to the VPME version and they are resistant. I am proposing they go to a cloud version of my VPME application. Hope that works.

Again, I need to see the flow of the program rather than looking for a syntax error. THe program does not indicate any problem, The result of running the app do reveal there is a logic error of some kind. THe app calls a routine that communicates with an AS400. I don't have that environment in my office so I can't duplicate the issue.

I suspect there is no way to document the program flow since the app is run from an exe. I probably have to put a bunch of wait windows in the exe to sees where the logic is processing, etc.
TIA
Don
btiguy
 
Posts: 455
Joined: Mon Jun 21, 2010 4:03 pm

Re: Document Code

Postby DavidLeMesurier » Sat Apr 11, 2015 11:29 pm

Rather than wait windows add some code that looks for the presence of a file, say debug.txt, and then if that is present set a variable in memory. If teh variable is set then get the code to write out info to a txt file, adding to it each time. then all you need to do is look a the txt file at the end of the run to see what code was run, remove the debug.txt file to stop the write out code runing.

If you set a variable then teh code does not have to keep checking for teh presence of the file, slightly quicker to run that way
DavidLeMesurier
 
Posts: 82
Joined: Sun Jun 13, 2010 12:43 am
Location: Dubai

Re: Document Code

Postby Bob » Sun Apr 12, 2015 8:20 am

Ooops... thought this was VPM.

So it seems that your exe is returning an incorrect result some where, but no crash or error display? And sounds like it has to do with the AS400 exchange? Perhaps the client can check the AS400 for error reports?
Bob
 
Posts: 718
Joined: Mon Jun 14, 2010 6:53 am
Location: Near Albany, NY


Return to Visual FoxPro

Who is online

Users browsing this forum: No registered users and 1 guest

cron