To test AFP application AFP 3.0 utilizes the debugger provided in Visual FoxPro. To process AFP pages in the debugger you have to run the full version of Visual FoxPro 7 or 8.
As a first step, start Visual FoxPro. Then run AFP3Debug.PRG in the AFP3 directory. This will start AFP3.8.EXE with the most commonly used options. You may of course start AFP3.8.EXE resp. AFP3.7.EXE with the options you require (e.g. specify a different configuration file). AFP running in test mode takes precedence over all other active AFP instances. Because of this you need not terminate the 'normal' AFP to re-direct all incoming requests to the test instance.
You can execute AFP3Debug.PRG even without AFP running. In this case the actual server that is to perform certain background tasks will not be running. More precisely, the remote control of the ControlCenter will not function, there will be no clearing away of sessions and no detection of hung instances.
We recommend the use of separate machines for development and live operations. Whenever you require it, you launch AFP on your development machine. On your live server, by contrast, AFP runs as a service.
In the test instance of AFP you may use all commands that are provided in VFP for testing purposes. The following program will permit you to change over to the debugger at any point in your AFP page. You may also use SET STEP ON in lieu of ASSERT.
<%
ASSERT .F.
? "Hello World!"
<%
The standard setting in Active FoxPro Pages is SET ASSERTS ON, in contrast to Visual FoxPro. If an error occurs within the test environment, a dialogue lets you choose one of three options: you can either interrupt the AFP page, ignore the error or cancel the program.
All dialogues and the debugger open on the Web server. Due to the limitations of Windows, dialogues might be displayed behind all other windows on the screen, and this fact would not be visible in the task bar. If your browser does not return a response, minimize all applications to find potential hidden dialogues.