Debugger: first Step Over after Hot Reload inside the patched method's active frame runs away — process runs to completion, re-bound breakpoint never hit (IncompleteStep)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 46/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- csharp, typescript, vscode
- Ambito
- developer-experience, devtools
Direzione di ricerca
Inizia riproducendo lo scenario con Calculator.cs e il test xUnit Add_ReturnsSum in una nuova sessione di debug di VS Code, seguendo la sequenza Hot Reload, Jump to Cursor e il primo Step Over. Esamina il trace DAP intorno a next, continued, stopped ed exited, insieme all’evento IncompleteStep di vsdbg. L’attività è completata quando il primo Step Over dopo il reload si arresta nel codice dell’utente, idealmente alla riga 13, senza terminare la sessione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
- VS Code 1.127.0
- C# extension 2.140.9 (also observed with C# Dev Kit 3.20.199 installed)
- .NET SDK 10.0.300, target
net10.0 - macOS 26.5 (arm64)
- Debugger: vsdbg (default
coreclradapter)
Summary
When the debugger is paused inside a method that has just been hot-patched (Hot Reload applied while stopped in that frame), and no step command has been issued earlier in the session, the first Step Over silently loses the stepper: instead of stopping on the next line, the process resumes and runs to completion. The breakpoint that was re-bound after the reload never fires, and the debug session ends. vsdbg emits its own VS/Diagnostics/Debugger/IncompleteStep telemetry event at that moment.
Reproduced 3/3 in fresh sessions clicking the UI manually; the DAP trace confirms next → continued → no stopped → exited.
Repro
Calculator.cs:
public class Calculator
{
public int Add(int a, int b)
{
int result = a - b; // line 12 — deliberately wrong
return result; // line 13
}
}
xUnit test:
[Fact]
public void Add_ReturnsSum() => Assert.Equal(5, new Calculator().Add(2, 3));
Steps (all in the UI, fresh debug session, no stepping before step 4):
- Set a breakpoint on line 13 (
return result;). Debug the test; it stops on line 13 witha=2 b=3 result=-1. - While paused: edit line 12 to
int result = a + b;and save. - Click Hot Reload (the flame button in the floating debug toolbar). The reload applies cleanly (no ENC errors).
- Right-click line 12 → Jump to Cursor (Set Next Statement back into the patched method). The debugger stops on line 12 as expected.
- Press Step Over (F10) once.
Expected
Stop on line 13 (or at worst anywhere in user code), session still paused.
Actual
The debug session ends: the step escapes, the process runs to completion (exit code 0), the breakpoint on line 13 never fires. The DAP trace shows next → continued → exited with no stopped event in between, and vsdbg logs a VS/Diagnostics/Debugger/IncompleteStep telemetry event.
Additional observations
- Does not reproduce if at least one Step of any kind was executed earlier in the same session, before the Hot Reload (2/2). A "warmed-up" stepper survives; then a different (milder) issue shows instead: the first post-reload step in the patched frame moves the instruction pointer but does not actually execute the source line (locals keep their previous values); from the second step onwards the new body executes normally. I can file that separately if useful.
- Inserting a 5-second delay between the reload and the jump/step does not help — this is not a race with delta application.
- Without any Hot Reload involved, repeated Jump-to-Cursor + Step Over rounds in the same paused frame are fully deterministic — the issue is specific to stepping in the (stale) active frame of an EnC-patched method.
- Lingua principale
- TypeScript
- Stelle
- 3.1k
- Fork
- 736
- Merge medio
- 21h 21m
- PR unite (30g)
- 42
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di dotnet/vscode-csharp
-
Infrastructure Test
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
dotnet/vscode-csharp#9791 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
C# crashApertaBug C#DK Needs More Info Reliability Remote Extensions Roslyn LSP
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
dotnet/vscode-csharp#9807 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Editor-Formatting Resolved-Configuration Issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
dotnet/vscode-csharp#9804 · 6 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Bug Debugger
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
dotnet/vscode-csharp#9802 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
untriaged
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
dotnet/vscode-csharp#9787 · 6 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di dotnet/vscode-csharp
Issue simili
-
refactor
Difficoltà 2/5 Mezza giornata Idoneità per principianti 84/100
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OHDSI/Data2Evidence#3450 ·
I maintainer di solito rispondono entro 2 giorni
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
redhat-developer/rhdh-plugin-export-overlays#4011 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
automation missing-model model-sync provider:ofox
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anomalyco/models.dev#8421 ·
I maintainer di solito rispondono entro 1 giorno
-
SlackAdapter and TelegramAdapter are not assignable to Adapter under exactOptionalPropertyTypesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno