Skip to content

Document new server CLI arguments (--trace, --protocol-log-level) in README/CONTRIBUTING #46

Description

@clrudolphi

Background

PR #42 (F41: LSP trace support) added two new command-line arguments to the LSP server (Reqnroll.IdeSupport.LSP.Server.exe), alongside the existing --log-level:

  • --trace <Off/Messages/Verbose> — seeds the LSP protocol trace level ($/logTrace), overridable at runtime via InitializeParams.Trace or $/setTrace.
  • --protocol-log-level <Off/Error/Warning/Info/Verbose> — controls OmniSharp's own internal diagnostics (request dispatch, DryIoc, JSON-RPC plumbing), independent of --log-level.

The PR also wired build-configuration-dependent defaults for all three flags (--log-level, --protocol-log-level, --trace) into the Visual Studio extension's server launch (LspServerConnectionService.ServerArguments), and into the VS Code extension via the reqnroll.trace.server setting (which drives InitializeParams.Trace / $/setTrace rather than a CLI flag).

None of the top-level or per-client docs currently describe these arguments or how each IDE glue component sets them.

Scope

Update the following to describe the new arguments and their precedence/defaults:

  • README.md
  • CONTRIBUTING.md
  • src/LSP/CONTRIBUTING.md — document --trace / --protocol-log-level alongside --log-level, and the precedence order between the CLI default, InitializeParams.Trace, and $/setTrace (see Program.cs's ConfigureServer/ResolveInitialTrace).
  • src/VisualStudio/CONTRIBUTING.md — document LspServerConnectionService.ServerArguments's DEBUG vs. RELEASE defaults and that VS currently has no end-user UI to change these at runtime.
  • src/VSCode/CONTRIBUTING.md — document the reqnroll.trace.server setting and how it maps to InitializeParams.Trace/$/setTrace instead of a CLI flag.

References

  • src/LSP/Reqnroll.IdeSupport.LSP.Server/Hosting/Program.cs (ParseTraceLevel, ParseProtocolLogLevel, ResolveInitialTrace)
  • src/VisualStudio/Reqnroll.IdeSupport.VisualStudio.Extension/LspInterception/LspServerConnectionService.cs (ServerArguments)
  • src/VSCode/src/lspInspectorLogger.ts (createTraceChannel, traceServerToLogLevel)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions