Telescope LSP Trace Runbook
March 13, 2026 ยท View on GitHub
This runbook captures a full extension-host debug session so Telescope behavior can be replayed and compared.
Scope
Use this when an issue only reproduces in the VS Code extension development host and not in isolated unit/integration tests.
Prerequisites
- Repository opened at
telescoperoot. go,bun, and VS Code/Cursor debug support installed.- Launch configuration present in
.vscode/launch.json(Launch Extension).
1) Start a trace session
- Open settings for the extension host workspace and set:
telescope.trace = "verbose"
- In
.vscode/launch.jsondebug config env, set:TELESCOPE_LOG_LEVEL=debug
- Start
Launch Extension(F5). - In the Extension Development Host window, open the target workspace/file that reproduces the issue.
2) Capture all three log streams
Keep these visible while reproducing:
- Telescope output channel
- Output panel ->
Telescope Language Server - Contains extension lifecycle + LSP trace from client side.
- Output panel ->
- Extension host log
- Output panel ->
Log (Extension Host) - Contains extension host runtime events and errors.
- Output panel ->
- Server stderr/debug
- Debug Console for the launched extension host session.
- Contains Go
slogoutput fromtelescope serve.
3) Reproduce with an action checklist
Use a deterministic script while reproducing:
- Open file.
- Click exact symbol/line.
- Trigger command (if applicable).
- Trigger language feature (hover/definition/completion/references/etc.).
- Record expected result vs actual result.
Repeat the same sequence twice to validate reproducibility.
4) Stop and export logs
- Stop debugging.
- Save/export:
- Telescope output
- Extension host log
- Debug console output
- Preserve the file under a run folder such as:
.telescope/debug-runs/<timestamp>/
- Merge all streams into one timeline artifact:
pnpm run trace:merge -- --telescope-output <...> --extension-host <...> --server-log <...> --out <...>- See
docs/LSP-TRACE-TIMELINE.mdfor schema and examples.
5) Required metadata for each run
Always include:
- Commit SHA for
telescope. - Workspace fixture or repo path used.
- OS + editor version.
telescope.tracevalue.TELESCOPE_LOG_LEVELvalue.- Exact action script (the ordered interaction checklist).
6) Correlation tips
- Match LSP method names from client trace to server request logs.
- Compare timestamps around:
didOpen,didChange,didClose- request handlers (
hover,definition,completion, etc.) publishDiagnostics
- If behavior differs across runs, diff by timestamp window around the first divergent user action.
7) Fast sanity checklist
- Server process started from expected binary path.
- Correct workspace folder/session selected in multi-root mode.
- Target file classified as OpenAPI (
openapi-yaml/openapi-json) when expected. - Trace level still set to
verboseafter reload/restart.