Check What Source Code Lines Were Executed

Applies to AQTime 8.81, last modified on January 18, 2022

To check what lines of your application’s source code were executed during the application run, profile your application with the Coverage profiler or the Performance profiler:

  1. Make sure your application was compiled with debug information.

  2. Add the routines whose source code lines you want to profile to a line-level area and include this area in profiling tasks.

  3. Profile the application and get results.

  4. Select the Routines category in the Explorer panel.

  5. For the Coverage profiler, examine the Lines Covered, Lines Uncovered and %Covered columns of the Report panel. They display the number of executed lines, the number of non-executed lines and the percentage of lines executed in each profiled routine.

  6. Click the desired routine in the Report panel and switch to the Lines pane of the Details panel. The Hit Count (for Performance and Coverage) and Mark (for Coverage) columns on this pane let you know if this or that line was executed (green dots, Hit Count > 1) or not (red dots, Hit Count = 0).

It may be more convenient to explore line profiling results directly in the source code. Switch to the Editor panel and in the panel’s gutter Switch to the Visual Studio’s Code Editor and in the grid, which AQTime adds to the Code Editor, Switch to the Embarcadero RAD Studio’Editor and in the grid, which AQTime adds to the Editor, examine values in the Hit Count column (for Coverage and Performance) and green and red dots in the Mark column (for Coverage) next to each source code line.

Note: If the required column is not visible, right-click within the guttergridgrid, select Field Chooser from the context menu and then drag the column to the guttergridgrid from the ensuing Field Chooser window.

See Also

Coverage Profiling
Best Practices and How to Tutorials
Coverage Profiler - Overview
Performance Profiler - Overview

Highlight search results