Conversation
| { | ||
| var editSession = _editSession; | ||
| if (editSession == null) | ||
| if (editSession == null || !editSession.InBreakState) |
There was a problem hiding this comment.
Is editSession ever null here now? Other than when EnC isn't active at all, but these calls shouldn't happen then, right? This could be a contract check perhaps?
There was a problem hiding this comment.
I'll follow up with refactoring that cleans up edit session nullability. That can wait for Preview 3 though.
| } | ||
|
|
||
| public async Task ExitBreakStateAsync(CancellationToken cancellationToken) | ||
| public Task ExitBreakStateAsync(CancellationToken cancellationToken) |
There was a problem hiding this comment.
Why does this still exist? Isn't this just part of CommitSolutionUpdate now?
There was a problem hiding this comment.
No. This is still called by the debugger and signals end of break state. That's now different from end of edit session.
src/Features/Core/Portable/EditAndContinue/EditAndContinueWorkspaceService.cs
Show resolved
Hide resolved
| documentsToReanalyze = session.GetDocumentsWithReportedDiagnostics(); | ||
|
|
||
| _debuggingSessionTelemetry.LogEditSession(_editSessionTelemetry.GetDataAndClear()); | ||
| // TODO: report a separate telemetry data for hot reload sessions to preserve the semantics of the current telemetry data |
There was a problem hiding this comment.
i woudl love threading asserts on all these methods (i.e. AssertIsForeground/AssertIsBackground/ThisCanBeCalledOnAnyThread. It makes reading and understanding potential threading/sync/consistency issues more simply.
There was a problem hiding this comment.
Why? There is no thread affinity. By default we don't put attributes on methods that don't have affinity.
src/Features/Core/Portable/EditAndContinue/IEditAndContinueWorkspaceService.cs
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/Remote/IRemoteEditAndContinueService.cs
Show resolved
Hide resolved
* upstream/main: (75 commits) Split BoundInterpolatedString into BoundInterpolatedString and BoundUnconvertedInterpolatedString (dotnet#52061) Combine VB comparers into one, and combine VB and C# comparers together (dotnet#51834) Use OptimizedVSCompletionList in LSP scenarios. F5 Hot Reload (dotnet#52101) Fix typescript shim Add tests for lazy syntax trees coming from the GeneratorDriver React to code review feedback. Simplify the lazy-initalization pattern used in GetRoot Remove an unnecessary override. (dotnet#52140) Update issue number (dotnet#52130) Enable CodeActions support for XAML using its own provider and CodeActionCache. The handlers are actually shared with Roslyn as is. (dotnet#52129) Add RestrictedIVT to dotnet watch to Features (dotnet#52087) Don't try to highlight operators (dotnet#52041) Use `null` instead of empty signature helps in LSP Use member type for relational pattern even in error cases (dotnet#51950) Update src/VisualStudio/Xaml/Impl/Implementation/LanguageServer/Extensions/SymbolExtensions.cs Use new QuickInfoUtilities helper Rebuild API shape (dotnet#52079) Added position parameter name Updated XAML QuickInfo to show more info like C# by using ISymbolDisplayService and adding more documentation parts. ...
Implements Roslyn side of https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1286563.
This change enables the debugger to query for and apply updates while the app being debugged is running, as opposed to when it's at a break state.
Previously Roslyn allowed changes to be made while the app is running but reported a warning that these changes won't be applied until the app is broken and resumed.
The previous Roslyn-debugger protocol required the following operation sequence:
StartDebuggingSession(StartEditSessionEmitSolutionUpdate(CommitSolutionUpdate|DiscardSolutionUpdate| rude edits reported)EndEditSession)*EndDebuggingSessionThis PR changes the sequence to:
StartDebuggingSession(EnterBreakState?EmitSolutionUpdate(CommitSolutionUpdate|DiscardSolutionUpdate| rude edits reported ))*EndDebuggingSessionStartDebuggingSessionnow starts run state edit session.EnterBreakStatecloses current run state edit session and opens a new, break state edit session with active statements provided by the debuggerCommitSolutionUpdatecloses current edit session and opens a new run state edit session (without active statements)DiscardSolutionUpdateis called when Reports no rude edits but other EnC providers fail (2-phase commit), it keeps the current edit session open, the user can try to apply the changes again (not changed in this PR)EmitSolutionUpdatethe edit session remains open as well, the user can fix them and try apply again (not changed in this PR)EndDebuggingSessionnow closes current edit session.Follow ups: