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

debug list() command showing an extra }); at the end #9768

Closed
lholmquist opened this Issue Nov 23, 2016 · 5 comments

Comments

Projects
None yet
5 participants
@lholmquist
Contributor

lholmquist commented Nov 23, 2016

  • Version: v7.2.0
  • Platform: OSX 10.12.1
  • Subsystem:debug

While debugging a very simple file(index.js), contents are:

console.log('debugger');

and using the node debug index.js, i see this displayed:

screen shot 2016-11-23 at 10 10 46 am

On line 3, there is a random }); there. Don't know if this is a bug, or not.

I thought maybe it was because the code is possibly being wrapped for execution, but running a list(100) or some other big number, shows the same thing.

Obviously not a huge deal

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Nov 23, 2016

Contributor

Looks like this is the area of interest, https://github.com/nodejs/node/blob/master/lib/_debugger.js#L1107. That is removing the module wrapper, looks like nothing removes the end of the module wrapper

Contributor

lholmquist commented Nov 23, 2016

Looks like this is the area of interest, https://github.com/nodejs/node/blob/master/lib/_debugger.js#L1107. That is removing the module wrapper, looks like nothing removes the end of the module wrapper

@lholmquist

This comment has been minimized.

Show comment
Hide comment
@lholmquist

lholmquist Nov 23, 2016

Contributor

PR added: #9773

Contributor

lholmquist commented Nov 23, 2016

PR added: #9773

lholmquist added a commit to lholmquist/node that referenced this issue Dec 21, 2016

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

When doing the list command using a number that is more than the amount lines in that files, ex: list(10),
the ending of the Module wrapper was still showing.  This removes that line.

Fixes: nodejs#9768

lholmquist added a commit to lholmquist/node that referenced this issue Mar 22, 2017

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

When doing the list command using a number that is more than the amount lines in that files, ex: list(10),
the ending of the Module wrapper was still showing.  This removes that line.

Fixes: nodejs#9768
@Trott

This comment has been minimized.

Show comment
Hide comment
@Trott

Trott Jul 15, 2017

Member

In Node.js 8.x, the output makes it more clear what's going on (specifically, that the contents of the file are wrapped in a function):

$ node debug index2.js
(node:40275) [DEP0068] DeprecationWarning: `node debug` is deprecated. Please use `node inspect` instead.
< Debugger listening on ws://127.0.0.1:9229/f7cc0dbf-ae9a-43fa-be19-48505725769b
< For help see https://nodejs.org/en/docs/inspector
< Debugger attached.
Break on start in index2.js:1
> 1 (function (exports, require, module, __filename, __dirname) { console.log('debugger');
  2 
  3 });
debug> 

Still an issue in v6.x (and probably v4.x, though).

Member

Trott commented Jul 15, 2017

In Node.js 8.x, the output makes it more clear what's going on (specifically, that the contents of the file are wrapped in a function):

$ node debug index2.js
(node:40275) [DEP0068] DeprecationWarning: `node debug` is deprecated. Please use `node inspect` instead.
< Debugger listening on ws://127.0.0.1:9229/f7cc0dbf-ae9a-43fa-be19-48505725769b
< For help see https://nodejs.org/en/docs/inspector
< Debugger attached.
Break on start in index2.js:1
> 1 (function (exports, require, module, __filename, __dirname) { console.log('debugger');
  2 
  3 });
debug> 

Still an issue in v6.x (and probably v4.x, though).

@Trott Trott added the v6.x label Jul 15, 2017

@IonicaBizau

This comment has been minimized.

Show comment
Hide comment
@IonicaBizau

IonicaBizau Sep 22, 2017

Member

If I'm not wrong, this can be closed since the cli debugger is deprecated.

Member

IonicaBizau commented Sep 22, 2017

If I'm not wrong, this can be closed since the cli debugger is deprecated.

@apapirovski

This comment has been minimized.

Show comment
Hide comment
@apapirovski

apapirovski Apr 13, 2018

Member

Yep, we can close now.

Member

apapirovski commented Apr 13, 2018

Yep, we can close now.

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