Share via


Testing a Project

To verify references and check that all components are available before compiling an application, you can test the project. To do so, you rebuild the project, which forces Visual FoxPro to resolve file references and to recompile files that are out of date.

Use bookmarks, shortcuts, and breakpoints to mark locations in code so you can step easily through your code. For details, see Creating Bookmarks and Task List Shortcuts.

To test a project

  1. In the Project Manager, choose Build.

  2. In the Build Options dialog box, select Rebuild Project.

  3. Select any other options you need and choose OK.

    -or-

For example, to build a project named Myproj.pjx, type:

BUILD PROJECT myproj

If errors occur during the build process, they are collected into a file in your current directory with the name of your project and an .err extension. The compilation error count is displayed on the status bar. You can also see the error file immediately.

To display the error file immediately

  • Select the Display Errors box.

After the project has been built successfully, you should try to run it before creating an application.

To run the application

  • In the Project Manager, highlight the main program, and then choose Run.

    -or-

  • In the Command window, issue a DO command with the name of the main program:

    DO MAINPROG.PRG
    

If the program runs properly, you're ready to build an application file that will contain all the files included in the project.

You should repeat the steps of rebuilding and running your project as you add components to your project. Unless you choose Recompile All Files in the Build Options dialog box, only files that have been modified since the last build are recompiled.

See Also

Building an Application File from the Project | Compiling an Application | Project Manager | Build Options | Using the Automated Test Harness