Summary
On a .NET attach where the DAP-stopped thread is frameless and the session adopts a frame-bearing thread (the #465/#496 anchor mechanism), the adopted anchor is honoured by get_stack_trace, get_local_variables, and get_scopes — but evaluate_expression without a frameId is not routed to the adopted thread's top frame: it fails error CS0103: The name 'counter' does not exist in the current context, while get_local_variables on the same session returns counter = 33 and an explicit evaluate_expression { frameId: 1 } evaluates it fine. #496's escape hatch is two-thirds wired.
Observed on all three NPX servers during the end-of-series /testdebugger sweep (2026-08-30); pre-existing (the anchor mechanism predates the refactor series).
Suggested fix
When no frameId is supplied, resolve the default frame from the same anchor the locals path uses (the adopted thread's top frame), not from the raw stopped-event thread. Unit test at the session layer with the dotnet frameless-stopped-thread fixture: anchorless evaluate answers about the adopted thread.
Summary
On a .NET attach where the DAP-stopped thread is frameless and the session adopts a frame-bearing thread (the #465/#496 anchor mechanism), the adopted anchor is honoured by
get_stack_trace,get_local_variables, andget_scopes— butevaluate_expressionwithout aframeIdis not routed to the adopted thread's top frame: it failserror CS0103: The name 'counter' does not exist in the current context, whileget_local_variableson the same session returnscounter = 33and an explicitevaluate_expression { frameId: 1 }evaluates it fine. #496's escape hatch is two-thirds wired.Observed on all three NPX servers during the end-of-series
/testdebuggersweep (2026-08-30); pre-existing (the anchor mechanism predates the refactor series).Suggested fix
When no
frameIdis supplied, resolve the default frame from the same anchor the locals path uses (the adopted thread's top frame), not from the raw stopped-event thread. Unit test at the session layer with the dotnet frameless-stopped-thread fixture: anchorless evaluate answers about the adopted thread.