FAQ
Hello,

I am trying to debug a very simple app in node.js and I am having problems.

Here are my stages:

*1. In node.js console:*
npm install -g node-inspector

*2. In app.js:*
var foo = function(){
var a = 3, b = 5;
debugger;
var bar = function() {
var b = 7, c = 11;
a += b + c;
debugger;
}
bar ();
debugger;
};
foo();

*3. In node.js console:*
node --debug-brk app.js

Response: debugger listening on port 5858

*4. In another node.js console:*
node-inspector

Response:
info - socket.io started
visit http://0.0.0.0:8080/debug?port=5858 to start debugging


However if I browse to *http://0.0.0.0:8080/debug?port=5858*<http://0.0.0.0:8080/debug?port=5858> I
just get:

This webpage is not available
The webpage at *http://0.0.0.0:8080/debug?port=5858* might be temporarily
down or it may have moved permanently to a new web address.
Error 108 (net::ERR_ADDRESS_INVALID): Unknown error.
Any ideas where I am going wrong here?
Thanks, Dave J.


--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Search Discussions

  • José F. Romaniello at Nov 29, 2012 at 6:00 pm
    if you are running this on windows 0.0.0.0 doesnt exist there.. you should
    use 127.0.0.1 or localhost


    2012/11/29 Dave Johnson <davejohnson10000@gmail.com>
    Hello,

    I am trying to debug a very simple app in node.js and I am having problems.

    Here are my stages:

    *1. In node.js console:*
    npm install -g node-inspector

    *2. In app.js:*
    var foo = function(){
    var a = 3, b = 5;
    debugger;
    var bar = function() {
    var b = 7, c = 11;
    a += b + c;
    debugger;
    }
    bar ();
    debugger;
    };
    foo();

    *3. In node.js console:*
    node --debug-brk app.js

    Response: debugger listening on port 5858

    *4. In another node.js console:*
    node-inspector

    Response:
    info - socket.io started
    visit http://0.0.0.0:8080/debug?port=5858 to start debugging


    However if I browse to *http://0.0.0.0:8080/debug?port=5858*<http://0.0.0.0:8080/debug?port=5858> I
    just get:

    This webpage is not available
    The webpage at *http://0.0.0.0:8080/debug?port=5858* might be temporarily
    down or it may have moved permanently to a new web address.
    Error 108 (net::ERR_ADDRESS_INVALID): Unknown error.
    Any ideas where I am going wrong here?
    Thanks, Dave J.


    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Dave Johnson at Nov 29, 2012 at 6:26 pm
    http://127.0.0.1:8080/debug?port=5858 seems to do the trick many :) Many
    thanks
    On Thursday, 29 November 2012 17:52:52 UTC, Dave Johnson wrote:

    Hello,

    I am trying to debug a very simple app in node.js and I am having problems.

    Here are my stages:

    *1. In node.js console:*
    npm install -g node-inspector

    *2. In app.js:*
    var foo = function(){
    var a = 3, b = 5;
    debugger;
    var bar = function() {
    var b = 7, c = 11;
    a += b + c;
    debugger;
    }
    bar ();
    debugger;
    };
    foo();

    *3. In node.js console:*
    node --debug-brk app.js

    Response: debugger listening on port 5858

    *4. In another node.js console:*
    node-inspector

    Response:
    info - socket.io started
    visit http://0.0.0.0:8080/debug?port=5858 to start debugging


    However if I browse to *http://0.0.0.0:8080/debug?port=5858*<http://0.0.0.0:8080/debug?port=5858> I
    just get:

    This webpage is not available
    The webpage at *http://0.0.0.0:8080/debug?port=5858* might be temporarily
    down or it may have moved permanently to a new web address.
    Error 108 (net::ERR_ADDRESS_INVALID): Unknown error.
    Any ideas where I am going wrong here?
    Thanks, Dave J.
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Mark Hahn at Nov 29, 2012 at 6:44 pm
    You need to replace 0.0.0.0 with an ip address to your server.

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedNov 29, '12 at 5:52p
activeNov 29, '12 at 6:44p
posts4
users3
websitenodejs.org
irc#node.js

People

Translate

site design / logo © 2022 Grokbase