Nil absolute path displayed for LineBreakpoint in ERB files
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with lib/debug/breakpoint.rb around lines 192 and 241, comparing how paths are assigned for breakpoints. Reproduce the ERB breakpoint example and inspect show_bps output. Done means ERB line breakpoints display their file path while continuing to stop at the specified line.
Written by the indexing model from the issue text.
Description
https://github.com/ruby/debug/blob/bead0984d241a91235e3d3bacd247f0363d2d530/lib/debug/breakpoint.rb#L192
The iseq.absolute_path seems to always be nil for .erb files even though the breakpoint works correctly and stops the execution
at the specifiied line in the erb file.
Therefore the show_bps is broken for such breakpoints showing only the line number:
break app/views/earth/users/index.html.erb:50
break
0 BP - Line :50 (line)
Should the mentioned code be changed to:
@path = iseq.absolute_path || iseq.path
like it is already done at:
https://github.com/ruby/debug/blob/bead0984d241a91235e3d3bacd247f0363d2d530/lib/debug/breakpoint.rb#L241
or should this be fixed at the ruby lang level and make iseq.absolute_path properly return the erb file's absolute path?
- Dominant language
- Ruby
- Stars
- 1.3k
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/debug
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
バグ
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
voxpupuli/puppet-epel#186 · 1 comment ·