Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for getting debugger data tips through LSP. #76285

Merged
merged 20 commits into from
Dec 6, 2024

Conversation

CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner December 5, 2024 22:25
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 5, 2024
{
private static async Task TestAsync(string markup, string expectedText = null)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to base type to share with VB.

<[UseExportProvider]>
<Trait(Traits.Feature, Traits.Features.DebuggingDataTips)>
Public Class DataTipInfoGetterTests

Private Shared Async Function TestNoDataTipAsync(input As XElement) As Task
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed and replaced with calls to shared base class methods.

var document = context.GetRequiredDocument();

var service = document.GetLanguageService<ILanguageDebugInfoService>();
if (service is null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this ever be null? I think I saw a C#/VB/F# implementation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wasn't certain what our rules were with LSP. like how xaml works there. i wwanted to be a little safe.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is exported as ExportCSharpVisualBasicStatelessLspService, so it applies only to the main roslyn server (which supports C#,VB, and F#). It won't be called for anything else

}

internal readonly record struct DebugDataTipInfo(
TextSpan Span, TextSpan ExpressionSpan, string? Text, DebugDataTipInfoKind Kind = DebugDataTipInfoKind.None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TextSpan Span

Have we implemented this such that if the cursor in anywhere in Span, the same expression to evaluate will be produced?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. That should be the semantics of 'span'.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants