`break /foo/` for matched method

Abierto
#683 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

No files, tests, or implementation entry points are named. Start by tracing how the debugger parses and installs the existing break command, then determine how pending breakpoints and future method definitions are handled. Done means an agreed regexp notation and behavior for matching method names, including tests for existing and future definitions.

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

Descripción

enhancement

gdb has rbreak regexp (https://sourceware.org/gdb/onlinedocs/gdb/Set-Breaks.html) and maybe debug.gem can provide similar feature.

related to: https://github.com/ruby/debug/issues/655

Questions:

  • Notation:
    • break /foo/ all methods which names contains foo.
      • C1#foo, C2#foobar, C3#bazfoo, ...
    • break C#/foo/: C's methods which contains foo.
      • C#foo, C#foobar, ...
      • Seem's ugly...
    • break /C/#foo: Method foo of classes which names contain C.
      • C1#foo C2#foo, ...
      • Seems ugly too.
    • Only allow break /C#foo/ or break /C\.foo/ and so on?
    • Only allow to match method name?
      • It seems simple. We can extend it later.
  • Behavior:
    • Set breakpoints for existing matched methods (no problem)
    • Set breakpoints for future defined matched methods?
      • break /initialize/ means all initialize methods (and defined in future) can be trapped.
      • maybe it is convenient to support it.
    • Can we support break /obj.foo/ style?
      • maybe no if we allow future defined methods.

So current idea is:

  • break /regexp/ set method breakpoints where the method name matched with Class/Module/method name.
    • break /foo/ should be matched with:
      • C#foo
      • D.foo
      • E.bazfooboo
      • We can not match on class/module names (at least now).
  • It leaves as a pending breakpoint and set breakpoint in future definitions. User needs to del it if you don't need more.
Lenguaje dominante
Ruby
Estrellas
1.3k
Forks
146
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ruby/debug

Todos los issues de ruby/debug

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.