Skip to content

Show the source path for a breakpoint in eval'd code - #1193

Open
adityawrk wants to merge 1 commit into
ruby:masterfrom
adityawrk:fix/erb-breakpoint-path
Open

adityawrk wants to merge 1 commit into
ruby:masterfrom
adityawrk:fix/erb-breakpoint-path

Conversation

@adityawrk

@adityawrk adityawrk commented Nov 29, 2026 •

Copy link
Copy Markdown

A breakpoint in code compiled by eval still stops, but LineBreakpoint#activate stored iseq.absolute_path. That is nil for eval'd sources, including ERB, so the breakpoint label kept only the line number:

Stop by #0  BP - Line  :3 (line)

The same stop now names the source:

Stop by #0  BP - Line  .../index.html.erb:3 (line)

A file loaded from disk still uses its absolute path. The iseq path is used only when there is no absolute path.

Fixes #1129.

LineBreakpoint#activate stored iseq.absolute_path, which is nil for
code compiled by eval, including ERB. The breakpoint still stopped,
but its label was only the line number.

Use the iseq path when there is no absolute path. A file loaded from
disk still uses its absolute path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nil absolute path displayed for LineBreakpoint in ERB files

1 participant