NCover Documentation

To enable source code highlighting:

  1. Make sure the developer generates PDBs when the source code is compiled, whether in Debug or Release mode.

  2. Make sure the path to the source files is the same as it was on the development machine. There are ways to make this work if the path is not the same, but putting the files in the same path is the easiest solution.

  3. When coverage runs, NCover.Analyze calls into the dbghelp.dll, which is the same one used by the Windows debugger, WinDbg. Tthe technique that WinDbg uses is not published in detail, but here is the basic sequence.

    a. First, look in the same directory as the DLL. This is the most common location for PDBs.

    b. Next, look in the directories that are specified by _NT_SYMBOL_PATH: http://stackoverflow.com/questions/967043/nt-symbol-path-format

    c. Finally, if a symbol server is specified in the _NT_SYMBOL_PATH, then try to download PDBs from the symbol server.

  4. The PDBs contain the sequence point information and the location of the source files. So, if the source files are in the same location as on the machine that compiled the PDBs, then NCover 4 will be able to display the source files and highlighting.

If you still need technical assistance, we can help:

Submit A Support Ticket