src: update --inspect hint text

* Removes "experimental" warning.
* Prints ws://_ip_:_port_:/_uuid_ for all IDs.
* Refers to nodejs.org guide for more details.

PR-URL: https://github.com/nodejs/node/pull/11207
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ibm.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
This commit is contained in:
Josh Gavant 2017-04-05 10:49:46 -07:00
parent e48d58b8b2
commit 6ade7f3601
2 changed files with 5 additions and 12 deletions

View File

@ -81,19 +81,12 @@ void PrintDebuggerReadyMessage(const std::string& host,
if (out == NULL) { if (out == NULL) {
return; 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) { for (const std::string& id : ids) {
fprintf(out, fprintf(out, "Debugger listening on ws://%s\n",
" chrome-devtools://devtools/bundled/inspector.html?"
"experiments=true&v8only=true&ws=%s\n",
GetWsUrl(host, port, id).c_str()); GetWsUrl(host, port, id).c_str());
} }
fprintf(out, "For help see %s\n",
"https://nodejs.org/en/docs/inspector");
fflush(out); fflush(out);
} }

View File

@ -461,11 +461,11 @@ exports.startNodeForInspectorTest = function(callback,
clearTimeout(timeoutId); clearTimeout(timeoutId);
console.log('[err]', text); console.log('[err]', text);
if (found) return; if (found) return;
const match = text.match(/Debugger listening on .*:(\d+)/); const match = text.match(/Debugger listening on ws:\/\/(.+):(\d+)\/(.+)/);
found = true; found = true;
child.stderr.removeListener('data', dataCallback); child.stderr.removeListener('data', dataCallback);
assert.ok(match, text); assert.ok(match, text);
callback(new Harness(match[1], child)); callback(new Harness(match[2], child));
}); });
child.stderr.on('data', dataCallback); child.stderr.on('data', dataCallback);