Skip to content

Commit

Permalink
Add the byebug line # to make the output 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 authored Apr 11, 2019
1 parent 3a9f402 commit adfaa7a
Showing 1 changed file with 1 addition and 1 deletion.
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}:#{(max+min)/2}"

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

0 comments on commit adfaa7a

Please sign in to comment.