Skip to content

Commit

Permalink
src: update --inspect hint text
Browse files Browse the repository at this point in the history
* Removes "experimental" warning.
* Prints ws://_ip_:_port_:/_uuid_ for all IDs.
* Refers to nodejs.org guide for more details.

PR-URL: #11207
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ibm.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
  • Loading branch information
joshgav committed May 4, 2017
1 parent e48d58b commit 6ade7f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
13 changes: 3 additions & 10 deletions src/inspector_socket_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,12 @@ void PrintDebuggerReadyMessage(const std::string& host,
if (out == NULL) {
return;
}
fprintf(out,
"Debugger listening on %s:%d.\n",
host.c_str(), port);
if (ids.size() == 1)
fprintf(out, "To start debugging, open the following URL in Chrome:\n");
if (ids.size() > 1)
fprintf(out, "To start debugging, open the following URLs in Chrome:\n");
for (const std::string& id : ids) {
fprintf(out,
" chrome-devtools://devtools/bundled/inspector.html?"
"experiments=true&v8only=true&ws=%s\n",
fprintf(out, "Debugger listening on ws://%s\n",
GetWsUrl(host, port, id).c_str());
}
fprintf(out, "For help see %s\n",
"https://nodejs.org/en/docs/inspector");
fflush(out);
}

Expand Down
4 changes: 2 additions & 2 deletions test/inspector/inspector-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,11 @@ exports.startNodeForInspectorTest = function(callback,
clearTimeout(timeoutId);
console.log('[err]', text);
if (found) return;
const match = text.match(/Debugger listening on .*:(\d+)/);
const match = text.match(/Debugger listening on ws:\/\/(.+):(\d+)\/(.+)/);
found = true;
child.stderr.removeListener('data', dataCallback);
assert.ok(match, text);
callback(new Harness(match[1], child));
callback(new Harness(match[2], child));
});

child.stderr.on('data', dataCallback);
Expand Down

0 comments on commit 6ade7f3

Please sign in to comment.