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

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

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

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

lholmquist opened this issue Nov 23, 2016 · 5 comments
Labels

Comments

@lholmquist
Copy link
Contributor

@lholmquist 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
Copy link
Contributor Author

@lholmquist 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
Copy link
Contributor Author

@lholmquist lholmquist commented Nov 23, 2016

PR added: #9773

lholmquist added a commit to lholmquist/node that referenced this issue Dec 21, 2016
… 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
… 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
Copy link
Member

@Trott 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
Copy link
Member

@IonicaBizau IonicaBizau commented Sep 22, 2017

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

@apapirovski
Copy link
Member

@apapirovski 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.