Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide config option to disable showing line numbers #881

Closed
jethrodaniel opened this issue Jan 4, 2023 · 4 comments
Closed

Provide config option to disable showing line numbers #881

jethrodaniel opened this issue Jan 4, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@jethrodaniel
Copy link

Your proposal
Provide a config option to disable showing line numbers.

Example:

  • config set show_line_numbers true shows line numbers (the default)
  • config set show_line_numbers false hides line numbers (like pry's @ -n)

Additional context
This is particularly useful when copying code from the debug session.

@gwillcox-r7
Copy link

Initial inspection using Sourcegraph shows this will likely require updating check_line_num! in test/support/test_case.rb as noted at https://sourcegraph.com/github.com/ruby/debug/-/blob/test/support/test_case.rb?L66-71, accounting for test_the_test_fails_when_the_script_doesnt_have_line_numbers at https://sourcegraph.com/github.com/ruby/debug/-/blob/test/support/test_case_test.rb?L22-28, and updating https://sourcegraph.com/github.com/ruby/debug/-/blob/test/support/assertions.rb?L5-9 in test/support/assertions.rb.

This would be in addition to adding in the new option. Looks like line numbers are currently tied into the current test stack quite a bit. It might be possible to remove this dependency but the changes would need to be careful to properly handle the cases above, and we would also potentially need to make sure callers of those functions update their function calls if we change the parameters of any of these calls.

@ko1 ko1 added the enhancement New feature or request label Mar 7, 2023
@ko1 ko1 added this to the v1.8.0 milestone Mar 7, 2023
@ko1
Copy link
Collaborator

ko1 commented Mar 7, 2023

Do you want to remove "current line" marker too?

@ko1
Copy link
Collaborator

ko1 commented Mar 7, 2023

Could you write the current output and expected output with small code?
(it is easy to understand the request)

ko1 pushed a commit that referenced this issue May 4, 2023
ko1 pushed a commit that referenced this issue May 5, 2023
ko1 pushed a commit that referenced this issue May 5, 2023
@ko1
Copy link
Collaborator

ko1 commented May 5, 2023

#973

@ko1 ko1 closed this as completed May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants