Browse Source

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>
v6
Josh Gavant 8 years ago
parent
commit
6ade7f3601
  1. 13
      src/inspector_socket_server.cc
  2. 4
      test/inspector/inspector-helper.js

13
src/inspector_socket_server.cc

@ -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);
} }

4
test/inspector/inspector-helper.js

@ -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);

Loading…
Cancel
Save