Skip to content

Show more context lines in node inspect than the default 2 #41788

Description

@cirosantilli

Is there a way?

E.g. I currently see only:

Break on start in main.js:3
  1 #!/usr/bin/env node
  2 
> 3 x = 0;
  4 x = 1;
  5 x = 2;
debug> n
break in main.js:4
  2 
  3 x = 0;
> 4 x = 1;
  5 x = 2;
  6 x = 3;
debug>

on node v14.15.3.

I'll send a PR if this will be accepted.

More details at: https://stackoverflow.com/questions/64942914/how-to-increase-the-number-of-context-lines-shown-in-the-node-js-debugger-when-u

Activity

  1. changed the title [-]Show more context lines thatn the default 2[/-] [+]Show more context lines than the default 2[/+] on Mar 13, 2021
  2. hybrist commented on Jan 31, 2022

    @hybrist
    Contributor

    Hey @cirosantilli! Thanks for the suggestion and sorry for the late reply. I think it's likely that such a PR would be accepted though the code has since moved to the main nodejs/node repository.

    Prior art in lldb: https://stackoverflow.com/questions/52274360/how-to-list-more-lines-of-code-code-in-lldb

  3. changed the title [-]Show more context lines than the default 2[/-] [+]Show more context lines in `node inspect` than the default 2[/+] on Jan 31, 2022
  4. added
    debuggerIssues and PRs related to the Node.js command-line debugger.
    on Jan 31, 2022
  5. cola119 commented on Mar 26, 2023

    @cola119
    Member

    Implemented in ##46812

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

    debuggerIssues and PRs related to the Node.js command-line debugger.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions