Skip to content

Commit

Permalink
Adds line # to make the filename clickable
Browse files Browse the repository at this point in the history
Adding the exact line number of the byebug statement to the end of
the filename on the output makes the statement clickable in IDE's
and editors supporting this functionality. Currently clicking the
path goes to the top of the file. With the modification, clicking
takes the user to the exact byebug line in the file.
  • Loading branch information
senhalil committed May 25, 2019
1 parent 0183ad5 commit cf53806
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Added

* [#553](https://github.com/deivid-rodriguez/byebug/pull/553): Shows the line number in the byebug statement so that supporting IDEs can take cursor to the debug point instead of the head of the file ([@senhalil]).

### Removed

* Support for MRI 2.3. Byebug no longer installs on this platform.
Expand Down
2 changes: 1 addition & 1 deletion lib/byebug/commands/list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def move(line, size, direction = "+")
# @param max [Integer] Upper bound
#
def display_lines(min, max)
puts "\n[#{min}, #{max}] in #{frame.file}"
puts "\n[#{min}, #{max}] in #{frame.file}:#{frame.line}"

puts source_file_formatter.lines(min, max).join
end
Expand Down

0 comments on commit cf53806

Please sign in to comment.