-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EnC: Fix document out-of-sync checks when module is not loaded when d… #39836
EnC: Fix document out-of-sync checks when module is not loaded when d… #39836
Conversation
…ebugging session starts Previous change dotnet#39295 allowed us to rely on PDB source file checksums when distinguishing between design-time-only documents that should be ignored when applying changes and documents whose changes must be applied to the debuggee. The change did not handle the case when the PDB isn't loaded yet when this check is being performed. This bug resulted in changes not being applied correctly and documents getting out-of-sync in scenarios where the modules were not loaded to the debuggee fast enough. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1013242
src/Features/Core/Portable/EditAndContinue/CommittedSolution.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this change fixes the linked bug, there are some more cases I'm working thru... |
src/Features/Core/Portable/Debugging/DebugInformationReaderProvider.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/CommittedSolution.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fully admit I don't understand some of the debugger stuff but I can definitely sign off on the well-written comments!
|
||
Assert.True(reader.TryGetDocumentChecksum("/a/c.cs", out var actualChecksum, out var actualAlgorithm)); | ||
Assert.Equal("21-C8-B2-D7-A3-6B-49-C7-57-DF-67-B8-1F-75-DF-6A-64-FD-59-22", BitConverter.ToString(actualChecksum.ToArray())); | ||
Assert.Equal(new Guid("ff1816ec-aa5e-4d10-87f7-6f4963833460"), actualAlgorithm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a constant for that?
/// <summary> | ||
/// The current document content matches the content the built module was compiled with. | ||
/// The document content is matched with the build output instead of the loaded module | ||
/// since the module hasn't been loaded yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// since the module hasn't been loaded yet. | |
// since the module hasn't been loaded yet. |
…ebugging session starts
Previous change #39295 allowed us to rely on PDB source file checksums when distinguishing between design-time-only documents that should be ignored when applying changes and documents whose changes must be applied to the debuggee. The change did not handle the case when the PDB isn't loaded yet when this check is being performed. This bug resulted in changes not being applied correctly and documents getting out-of-sync in scenarios where the modules were not loaded to the debuggee fast enough.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1013242