Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Internal error in Node's debugger #4466

purefan opened this Issue · 8 comments

4 participants


I was debugging my app and this happened:

$ node debug index.js
< debugger listening on port 5858
connecting...There was an internal error in Node's debugger. Please report this bug.
Unexpected token T
SyntaxError: Unexpected token T
    at Object.parse (native)
    at Protocol.execute (_debugger.js:131:43)
    at Client.<anonymous> (_debugger.js:175:14)
    at Client.EventEmitter.emit (events.js:96:17)
    at TCP.onread (net.js:391:31)

$ node -v

I dont know if anyone would need more information or if its even a current issue, it just said to report it and Im following instructions.

After I ran the exact same command a second time it worked, so probably not a big issue.


Hello @purefan.

Can you post source of index.js here? (Hope it's not a private thing).


Sorry it is private, but its not anything really complex I would say, perhaps the most complex thing is copying a socket (from to a couple of variables, other than that is plain old javascript


Ok, np.

If you have some time to try reducing this file and removing private things, while making this problem reproducible, and posting it here, I would be really pleased.

@indutny indutny was assigned

Thanks for the help indutny! since I posted the bug I have been using the same commands and just working on the project as usual but I haven't gotten any other error like this, I also tried running the same command without changing anything and it didnt happen, at this point it feels like it was just a fluke since it is the very first time I see this error myself and I have been working on this project for nearly 7 months. If I get it again I will trim it down and try to get the error once more, I just wish it were a constant problem, something I can reproduce at will


Ok, sounds good to me.


And thank you :)


hasn't been reproduced. if it is, ping back.

@trevnorris trevnorris closed this


I got the same error, after be using node-inspector for a while.

My app.js file is


// Ensure a "sails" can be located:
(function() {
  var sails;
  try {
    sails = require('sails');
  } catch (e) {
    console.error('To run an app using `node app.js`, you usually need to have a version of `sails` installed in the same directory as your app.');
    console.error('To do that, run `npm install sails`');
    console.error('Alternatively, if you have sails installed globally (i.e. you did `npm install -g sails`), you can use `sails lift`.');
    console.error('When you run `sails lift`, your app will still use a local `./node_modules/sails` dependency if it exists,');
    console.error('but if it doesn\'t, the app will run with the global sails instead!');

  // Try to get `rc` dependency
  var rc;
  try {
    rc = require('rc');
  } catch (e0) {
    try {
      rc = require('sails/node_modules/rc');
    } catch (e1) {
      console.error('Could not find dependency: `rc`.');
      console.error('Your `.sailsrc` file(s) will be ignored.');
      console.error('To resolve this, run:');
      console.error('npm install rc --save');
      rc = function () { return {}; };

  // Start server

A sails app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.