Source File Checksums - microsoft/VSDebugAdapterHost GitHub Wiki
Source File Checksums
Visual Studio can provide checksums for files to the debug adapter when setting breakpoints to ensure that the file open in the editor matches the one available to the debug adapter. The debug adapter can provide checksums for files to help Visual Studio locate and open the correct version of a source file.
Required Implementation
To support checksums, a debug adapter must:
- Return a set of supported checksum algorithms in the
supportedChecksumAlgorithms
field in theCapabilities
object returned in response to theinitialize
request. - Include a set of
Checksum
objects in thechecksums
field of anySource
object sent to Visual Studio. - Verify that the checksums contained in the
Source
object passed as an argument to thesetBreakpoints
request match the file available to the debug adapter, and return aBreakpoint
object with theverified
field set tofalse
if they do not match.
Remarks
Visual Studio may provide zero, one, or more than one checksum of a given algorithm, depending on user settings. If no checksums are provided, or if any of the provided checksums match, the debug adapter should consider it a valid match.