Skip to content

Commit 1139d78

Browse files
committed
support b path: path_expr
break on each line on `path_expr`.
1 parent 06342cd commit 1139d78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/debug/breakpoint.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def safe_eval b, expr
2323
b.eval(expr)
2424
rescue Exception => e
2525
puts "[EVAL ERROR]"
26-
puts " expr: #{expr}"
26+
puts " expr: #{expr.inspect}"
2727
puts " err: #{e} (#{e.class})"
2828
puts "Error caused by #{self}."
2929
nil
@@ -352,7 +352,7 @@ def setup
352352
next if ThreadClient.current.management?
353353
next if skip_path?(tp.path)
354354

355-
if need_suspend? safe_eval(tp.binding, @cond)
355+
if @cond.nil? || need_suspend?(safe_eval(tp.binding, @cond))
356356
suspend
357357
end
358358
}

0 commit comments

Comments
 (0)