Skip to content

Add 'roslyn/debuggerCompletion' to LSP#82422

Draft
jcouv wants to merge 3 commits intodotnet:mainfrom
jcouv:lsp-debug-completion
Draft

Add 'roslyn/debuggerCompletion' to LSP#82422
jcouv wants to merge 3 commits intodotnet:mainfrom
jcouv:lsp-debug-completion

Conversation

@jcouv
Copy link
Member

@jcouv jcouv commented Feb 16, 2026

This will allow supporting IntelliSense completion in debugger expression windows (Quick Watch, Watch, Immediate) via the debug adapter and Roslyn LSP. This improves the debugging experience when using the C# Dev Kit extension for VS Code.

Key changes:

  • add roslyn/debuggerCompletion handler
  • extract and re-use splicing logic
  • a couple of subtleties:
    • set specific completion options (mainly so that out-of-scope locals aren't filter out)
    • adjust the position on returned completion items (so that subsequent calls to resolve match the unspliced document)

Open issue: confirm that the debug adapter has access to LSP

@jcouv jcouv self-assigned this Feb 16, 2026

public const string StatementTerminator = ";";

public static DebuggerSplicePoint CalculateSplicePoint(SyntaxTree tree, int contextPoint)
Copy link
Member Author

Choose a reason for hiding this comment

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

📝 Extracted from CSharpDebuggerIntelliSenseContext.GetAdjustedBuffer

@jcouv jcouv force-pushed the lsp-debug-completion branch from 9e45a1e to c9b8444 Compare February 16, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments