From 1db1a36aa34d2fccba8b323a1e3fd361e31faf2c Mon Sep 17 00:00:00 2001 From: Josh Gavant Date: Wed, 5 Apr 2017 10:49:46 -0700 Subject: [PATCH] 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: _tbd_ Reviewed-By: _tbd_ --- src/inspector_socket_server.cc | 13 +++---------- test/inspector/inspector-helper.js | 4 ++-- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/inspector_socket_server.cc b/src/inspector_socket_server.cc index 1555e45dd6f4aa..5bc81a0e09ec16 100644 --- a/src/inspector_socket_server.cc +++ b/src/inspector_socket_server.cc @@ -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/guides/debugging_getting_started"); fflush(out); } diff --git a/test/inspector/inspector-helper.js b/test/inspector/inspector-helper.js index 2fb6a0e9996bdf..1f582870680787 100644 --- a/test/inspector/inspector-helper.js +++ b/test/inspector/inspector-helper.js @@ -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);