debug.rb: expand filenames in breakpoints

When debugging some local code, specifying a breakpoint to a local
filename does not work, i.e.

    break lib/foo.rb:10

Expanding the filename makes it work. FWIW byebug has the same behavior.
This commit is contained in:
Antonio Terceiro 2019-11-25 21:25:53 -03:00 committed by SHIBATA Hiroshi
parent 20031f8b74
commit ed5d032ea3
Notes: git 2019-12-05 13:28:57 +09:00

View File

@ -427,7 +427,7 @@ class DEBUGGER__
pos = $2
if $1
klass = debug_silent_eval($1, binding)
file = $1
file = File.expand_path($1)
end
if pos =~ /^\d+$/
pname = pos