¿Cómo depurar correctamente en Rails?
Frecuentes
Visto 49 veces
0
I'm using debugger in my code in multiple apps. However, I usually have to debug because of loops where one specific thing went wrong. Is there a way to let the debugger fast forward or autopilot to the point where I hit an error? I'm sick of using 'next' over and over until I get to the correct point in the loop!
1 Respuestas
2
You can call the debugger statement with a conditional. Something like this:
my_collection.each do |l|
debugger if l.has_some_bad_condition?
# ...
end
respondido 26 nov., 13:23
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas ruby-on-rails ruby debugging or haz tu propia pregunta.