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)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 46/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- csharp, typescript, vscode
- Área
- developer-experience, devtools
Línea de trabajo
Empieza reproduciendo el escenario con Calculator.cs y la prueba de xUnit Add_ReturnsSum en una sesión de depuración nueva de VS Code, siguiendo la secuencia de Hot Reload, Jump to Cursor y el primer Step Over. Inspecciona el trace de DAP alrededor de next, continued, stopped y exited, junto con el evento IncompleteStep de vsdbg. Se considera terminado cuando el primer Step Over posterior a la recarga se detiene en código del usuario, idealmente en la línea 13, sin finalizar la sesión.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.1k
- Forks
- 738
- Merge medio
- 19 h 24 min
- PR fusionados (30 d)
- 48
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotnet/vscode-csharp
-
Infrastructure Test
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
dotnet/vscode-csharp#9791 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Debugger untriaged
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
dotnet/vscode-csharp#9838 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
False Razor diagnostics on historical file in Git diff editorPosiblemente ocupada @davidwengier la tomó hoy. AbiertoC#DK Razor untriaged
dotnet/vscode-csharp#9831 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
C# crashAbiertoBug C#DK Needs More Info Reliability Remote Extensions Roslyn LSP
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
dotnet/vscode-csharp#9807 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Editor-Formatting Resolved-Configuration Issue
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
dotnet/vscode-csharp#9804 · 6 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de dotnet/vscode-csharp
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
betagouv/mon-entreprise#4699 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
jaegertracing/jaeger-ui#4547 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
ai-driven-qa
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
linagora/twake-calendar-frontend#1467 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
need4deed-org/sdk#267 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
auth0/universal-login#414 ·
Los mantenedores suelen responder en 1 día