Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`step_into`/`step_out` report incorrect `currentLine` and `currentLineContent`

Aperta
#82 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
csharp, typescript, vscode
Ambito
devtools

Direzione di ricerca

Inizia dai punti di ingresso step_into e step_out e riproduci la sequenza segnalata in un'applicazione console .NET, confrontando currentLine e currentLineContent con get_variables_values. Il lavoro è completato quando entrambi gli strumenti riportano la posizione effettiva del debugger dopo lo step, mentre step_over continua a riportare correttamente la riga successiva.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

The step_into and step_out tools report stale or incorrect values for currentLine and currentLineContent in their responses. The reported position does not match where the debugger actually stopped.

Steps to Reproduce
  1. Set a breakpoint on a line that calls a method (e.g., line 21: int result = Add(a, b);)
  2. Start debugging a .NET console app via start_debugging
  3. Hit the breakpoint (confirmed at line 21)
  4. Call step_into

Expected: Response shows currentLine pointing to the first line inside the Add() method (e.g., line 8: return x + y;)

Actual: Response shows currentLine: 21 (the call site, not the stepped-into location). However, get_variables_values correctly shows the parameters of Add() (x, y), confirming the debugger DID step into the method.

Observed Pattern
Tool Position Reported Variables Reported Actual Location
step_into Call site (stale) Correct (target method params) Inside target method
step_out Inside method (stale) Correct (caller's locals) Back in caller
step_over Usually correct Correct Next line

The position appears to be "one step behind" - reporting where the debugger WAS, not where it IS after the step completed.

Workaround

Always call get_variables_values after stepping to determine the true execution state. The variables are always accurate and reflect the actual paused location.

Impact

AI agents that rely on currentLine to build a mental model of execution flow will have an incorrect picture, potentially leading to confused reasoning about program state.

Environment
  • DebugMCP v1.1.4
  • .NET 9.0 console app (coreclr)
  • VS Code stable (latest)
  • C# extension: ms-dotnettools.csharp-2.140.8-win32-x64
Lingua principale
TypeScript
Stelle
511
Fork
60
Merge medio
2g 1h
PR unite (30g)
18

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/DebugMCP

Tutte le issue di microsoft/DebugMCP

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.