Skip to content

Provide config option to disable showing line numbers #881

Closed

Description

@mddelk

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.

Activity

  1. gwillcox-r7 commented on Jan 5, 2023

    @gwillcox-r7

    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.

  2. added this to the milestone on Mar 7, 2023
  3. ko1 commented on Mar 7, 2023

    @ko1
    Collaborator

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

  4. ko1 commented on Mar 7, 2023

    @ko1
    Collaborator

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

  5. ko1 commented on May 5, 2023

    @ko1
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions