Wednesday, June 14, 2006

Lost in Trace

I have a situation here that has me perplexed. I build an APP file, the VFP Builder Manager (Builder.APP) to be specific. I do a Recompile All, and have checked on Debug Info and unchecked Encrypted in the Project Info dialog when I build.

I have added a SET STEP ON in the code to figure out a problem I have with a new builder I am writing. When the Trace Window opens there is no code displayed. None. It is as if the Debug Info was checked off.

I have checked the code for SYS(2030) and there are no instances of this called in the project. There is no SET DEBUG OFF anywhere in the project. The FXPs are not readonly and not getting replaced because the code stops on my SET STEP ON. I have checked this with PROGRAM() and LINENO() in the Watch window and they match my additions to the Builder.PRG. No projecthook to reset the Debug Info setting. I even added a SYS(2030,1) to make sure VFP was not stopping the debugging internally.

I know I am running the correct version of the APP file by checking _BUILDER and doing a ?FDATE(_BUILDER) to see if the file is the correct build date.

As you probably know, I don't have much more hair to pull out.

Has anyone seen this before? Can anyone point me to the corrective action? There could be prizes!

5 Comments:

At 6/14/2006 08:44:00 PM, Blogger Chan Kok Kiet (John Jones) said...

Hi,
I faced it before. If I am not mistaken, I tried as below :
1. Copy prg to builder.app folder (same level)
2. Set breakpoint 'when expression is true', '"MYPRG" $ PROGRAM()'.
3. If step2 able to help to view source code, set breakpoint at the line you wan to debug as usual by dbclick left pane.

HTH

 
At 6/15/2006 07:02:00 AM, Blogger Andrew MacNeill said...

I agree- if the issue is the PRG - I see this all the time. It's because the debugger just can't seem to trace PRGs that it can't find. I personally hate this - why bother having an option to "Include Debug Info" when it's not really included?
(to be fair, that option simply ensures that line #s and programs are retained when reporting errors but still!)

But it is one of the main reasons why I continue to use visual classes to this day - I can actually debug them when I'm tracing it through in another directory.

 
At 6/15/2006 07:50:00 AM, Blogger Toni M. Feltman said...

I just ran into this problem recently as well. One of two things I did fixed it.

1. I set path to the folder where the source file (a prg in my case) actually existed. I know that this should not be necessary in an app, but hey we are grasping at straws here.

2. I deleted the .fxp file. Again, shouldn't need to but one of these two things worked.

 
At 6/15/2006 08:26:00 AM, Blogger Rick Schummer said...

We have a winner! Andrew alluded to the source not being available, but it was Toni's solution number one (set the path) that solved my problem.

Toni, the Amazon.com gift certificate is on the way!

I can tell you I have learned a lot from this experience. Mucho thanks from Sterling Heights.

 
At 8/30/2006 12:44:00 AM, Anonymous tganss said...

Hi Rick,

there are some situations where even setting the path doesn't always give you the source of prg's. If you ever run into this (again), check/compare the relative location of your pjx to the source code to the actual app to your source. Gives trouble ONLY with prg and not with vcx and made my life miserable at a place where they sequesterd all their pjx into a subDir.

regards

thomas

 

Post a Comment

<< Home