P4VS User Guide (2020.2)

Finding code changes and references with CodeLens

With Microsoft Visual Studio 2019 version 16.1, P4VS supports the CodeLens feature. With the relevant CodeLens option enabled (which is the default), you can view the names of users who made changes to classes, functions, and methods throughout the code and get a preview of up to five changelists. You can also open a changelist, the file history, and the Time-lapse View.

Note

The Time-laps View link is only available if P4V is installed.

If needed, you can modify the configuration under Tools > Options > Text Editor > All Languages > CodeLens > Show Submitted Changelists (Helix).

To use the CodeLens feature with P4VS:

  1. Above a class or function, move the pointer over the gray user name, as indicated in the following figure.

    Change marker with CodeLens changes feature

    A tooltip with additional information about the last changes appears.

  2. To open a callout displaying the latest five changes, as shown in the following figure, click the user name.

    Codelens details
  3. To view more information on any of these changes, do one of the following:

  4. To view more information on the file itself, click the Show History or Time-lapse View links.