flutter / flutter/devtools

Add ability to observe active timers and microtask queues

Abierto
#2,152 3 comentarios 7 reacciones 0 asignados Ver en GitHub
g3 P3 screen: debugger
Lenguaje dominante
Dart
Estrellas
1.7k
Forks
404
Merge medio
6 d 17 h
PR fusionados (30 d)
18

Descripción

[I am filing within the context of widget tests but I believe this is useful in general for debugging Dart code.]

Certain Widget tests use `runAsync` to run code in real async zone. These tests are often flaky and developers have a hard time understanding why. Most often the culprit is some Timer or Microtask that causes a side-effect that the test depends on. If this task does not run in time, it hangs the test.

When I was debugging an issue like this, I had to instrument `ZoneSpecification` to figure out what was creating the timers and microtasks. This is advanced debugging for a regular user who often does not understand zones.

The request here is to be able to see active timers and the microtask queue of the current zone when the code is paused at a breakpoint. It would also be helpful to see *all* Timers and microtasks but this might be more confusing than helpful. When the user taps on a timer it would be useful to see where the timer was originally created and what its current state is.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start by reviewing the request in the context of DevTools' Dart debugging support and widget tests using runAsync. Scope how active timers, microtask queues, creation locations, and timer state should be represented while paused; done requires an agreed design and an implementation plan, since no files or tests are identified here.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
dart
Área
devtools
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.