Share via


Examining Application Coverage and Profile

To use the Coverage Profiler effectively, prepare your application and your environment carefully. If you use the following guidelines, the Coverage Profiler can provide accurate and useful information about your project or application.

To use the Coverage Profiler to examine application coverage

  1. Use the Coverage Logging option of the Debugger Tools menu or the SET COVERAGE command to start the coverage data stream and to open the file to log that data.

  2. Run the program or application you want to examine for coverage.

  3. Run the coverage application from the Tools menu or use DO (_COVERAGE) in the command window.

    The Coverage Profiler application starts in Coverage Mode by default.

To use Coverage Profiler to examine application profile

  1. Use the SET COVERAGE command to start the coverage data stream and to open the file to log that data.

  2. Run the program or application you want to profile.

  3. Run the coverage application from the Tools menu or use DO (_COVERAGE) in the command window.

  4. Click the Profile Mode button in the Coverage Profiler dialog box.

    If you find that you are most often interested in profiling, you can change the default to Profile Mode in the Coverage Profiler Options dialog box.

To use the Coverage Profiler with a specific log file

  • Run the coverage application using the WITH option and the log file name as in the following example:

    DO (_COVERAGE) WITH "Mylog.LOG"
    

    This example uses the log file Mylog.log and opens the Coverage Profiler application window to display the results. If you specify no file name, the Coverage Profiler uses the log specified in a current SET COVERAGE TO command or displays the Open file dialog box when coverage logging is OFF.

To use the Coverage Profiler without the User Interface

  • Run the coverage application using the WITH option and specify true (.T.) for unattended mode running as in the following example:

    DO (_COVERAGE) WITH "Mylog.LOG",.T.
    

    In this example, the Coverage Profiler application uses the log file Mylog.log and runs without displaying the Coverage Profiler application window.

To use the Coverage Profiler with a specific Add-In file

  • Run the coverage application using the WITH option and the add-in file name as in the following example:

    DO (_COVERAGE) WITH "Mylog.LOG",, "add_ui.prg"
    

    This example uses the log file Mylog.log and opens the Coverage Profiler application window to display the results, and then the Add-In program ADD_UI.PRG runs. The second, unspecified, parameter is a logical value that specifies whether the coverage engine operates in unattended mode. In the default setting, false (.F.), the Coverage Profiler window displays.

Besides viewing the profiler information, you can insert comments or markers and you can save the information as a file to use later.

See Also

Coverage Profiler Application | Coverage Profiler Modification | Development Productivity Tools | Coverage Profiler Add-Ins | Project Manager Hooks