Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging techniques for templates
Message
De
05/11/2001 16:11:53
Charles Richard
Nvo Management Systems
Boisbriand, Québec, Canada
 
 
À
05/11/2001 15:56:11
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Divers
Thread ID:
00576293
Message ID:
00577602
Vues:
10
Hi again Randy

I had gotten the gist of the process involved with scripts and templates. The purpose of this thread now is to get the tricks people have found to reach debugging production quickly. One of those tips are those you have just outlined and I thank you for that.

F.Y.I. One of the problems I had with debugging initially was that I kept getting Source Not Available in the debugger when I went into wweval. It took a while to discover that when wconnect initializes (when I start VFP), wconnect runs console.exe. Then when I run my server, it finds wweval in console.exe and console.exe of course is compiled. So I renamed console.exe. Although I get an error now on startup of VFP with wconnect, when I run my server, wweval is found in the actual class library instead of within console.exe and I can trace the code.


>When CodeBlock processes code interactively, it uses a 2-stage process. The first stage, called the PreProcessor, builds a map of the structure of the code, and detects things like SCAN/ENDSCAN mismatches, which tell it not to even bother trying to run the code.
>
>You were seeing these types of messages, because you were trying to run something structured like a WC script as a WC template. In a template, each block of code is standalone. So something like a SCAN/ENDSCAN in a script, looks like 2 code blocks in a template, one with only a SCAN and one with only an ENDSCAN. Thus each produces an error.
>
>One extra tip for debugging PreProcessing messages, if you can't detect it from the error message, is to copy the code into a VFP editor window, and try compiling it. You may find the error quickly that way.
>
>In this instance, however, the real problem was just getting used to the WC concepts of templates vs. scripts. I wrote a description of this once, which I think Rick used as the basis of a KB help topic:
>
>http://www.west-wind.com/wckb/whatsthedifferencebetweenatemplateandascript.htm
>
>-- Randy
>
>>Good catch Randy .. I was still hoping for additional debugging tips but it's time to close this one. Thanks.
>>
>>>Just to close this thread here...we discussed and resolved this item on the West-Wind message board last week. This was a Script vs. Template issue. -- Randy
Charles Richard
NVO Management Systems
crichard@nvo.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform