Skip to content

Debugger - Filter out the ending of the Module wrapper when using the list command

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

Debbuger

Description of change

PR for https://github.com/nodejs/node/issues/9768.

When inside the debugger, doing a list(10) on a file with only say 5 lines, would print the end of the module wrapper on the last line.

There is code currently to make sure that the first part of the Module wrapper is filtered out. that is located here: https://github.com/nodejs/node/blob/master/lib/_debugger.js#L1107

The code added filters out the very last line of the lines array, which is the ending of the module wrapper.

I did not add a test for this. I don't believe there was one that tests List anyways. If there needs to be one, i will try and look at the other debugger tests as an example

Merge request reports

Loading