Files
Language-Server/docs/roadmap/21-inspection-api.md
T
faumaray da8003f6d4 Implement the VLS roadmap on the native VBS build
Native VBS and CMake builds of the server and every registered suite:
protocol and document sync, VBS/compdb providers, stock GCC diagnostics
(including in-process default profile preparation), the stock occurrence
observer and hover/definition, the bounded Scheduler, C++ module graph,
scan and artifact cache with real CMI production, the context-aware
symbol index with schema-2 snapshot migration, navigation and guarded
rename, reflection provenance with splice-origin extraction, index-backed
completion and signature help, live GCC worker control with a registered
DAP suite, and the Neovim and VS Code clients.

VoidLibrary follows main. The private GCC 16.2.0 frontend is reproduced
from the versioned patches and verified stepping reflection/template code
with projected values 17/34 and 41/82.
2026-12-05 14:06:50 +03:00

3.4 KiB

21 — Shared custom inspection API and view models

The recorded adapter implements schema version 1 over the same DAP session. vls/session reports the recording outcome and current cursor. Page requests vls/timeline and vls/frames take the session ID, schema version, current generation, start and count. Pages contain up to 256 events or frames. vls/seek moves to a verified event or an adjacent integral result. Every movement expires the earlier frame, scope and page references. The debugger retains the captured source for the session. Template and constraint trees, reflection entities, generated views and live inspection remain open. Requirements: R-013,R-016,R-018,R-019,R-020 Dependencies: 12,18,19,20; contract frozen before independent22/23 view implementations.

Ownership and boundaries

Proposed Sol: NEW include/vls/debug/inspection/, src/debug/inspection/, tests/debug/inspection/. Root owns versioned response schemas consumed by both clients. Future assignments must verify the then-current baseline and exact disjoint paths; these proposed scopes do not authorize work in another repository.

Contracts and data flow

NEW read-only custom DAP requests expose event timeline, template/constraint tree, reflection entities and generated-source views. All requests include session and stop/replay generation; responses are bounded/paged and carry the same identity. DAP remains the sole execution-control authority.

Implementation sequence

  1. Define stable view DTOs with source links, event/type/entity IDs, child pagination and explicit incomplete/unavailable states. Avoid exposing raw AST structures as a public schema.
  2. Project live captured state and saved replay through the same query service, preserving the difference between source snapshot and current editor contents.
  3. Implement lazy expansion, deterministic ordering, pagination/cancellation and bounded content rendering. Generated-source views include origin chains and remain read-only.
  4. Define command bindings for clients to select an event/entity and navigate to source through standard controls, without creating a second independent debugger state machine.

Failure behavior and constraints

Stale responses are rejected after continue/step/seek even if source bytes have not changed. Missing values, truncated trees or unsupported entity forms remain visible. Paging tokens are session/generation-bound; client text is escaped before HTML/editor rendering.

Acceptance scenarios

  1. Compare identical live/replay view queries and verify stable origins/values at matched positions.
  2. Race inspection/paging against continue, replay seek, termination and backend restart; ensure obsolete content cannot replace current views.
  3. Test huge graphs, cycles, hostile display strings, incomplete traces and client cancellation within memory/latency limits.

Verification and integration

Proposed NEW CTest label: inspection. Once implemented, register a nonzero suite and run:

dev cpp-gcc -c ctest --test-dir build/bootstrap -L inspection --output-on-failure

This future command is not evidence that the label/tests exist now. Before dispatch, bind the fixtures above to actual targets and record prerequisites/side effects. Require fresh independent review of the implemented contract and affected integrations. Keep old schema versions only through explicit adapters; incompatible clients receive clear errors. Disable custom inspection without disabling standard DAP control or altering trace data.