From c0ae3b237364f5e6723cfa70784eafd55f466a7e Mon Sep 17 00:00:00 2001 From: Kohei Ueno Date: Sun, 12 May 2024 03:48:30 +0900 Subject: [PATCH] inspector: introduce the `--inspect-wait` flag PR-URL: https://github.com/nodejs/node/pull/52734 Reviewed-By: Daeyeon Jeong Reviewed-By: James M Snell Reviewed-By: Minwoo Jung --- doc/api/cli.md | 16 +++++++++++++++ doc/api/debugger.md | 17 ++++++++++++++-- doc/node.1 | 5 +++++ src/inspector_agent.cc | 20 +++++++++++-------- src/node_options.cc | 8 ++++++++ src/node_options.h | 6 ++++++ test/parallel/test-inspector-wait.mjs | 28 +++++++++++++++++++++++++++ 7 files changed, 90 insertions(+), 10 deletions(-) create mode 100644 test/parallel/test-inspector-wait.mjs diff --git a/doc/api/cli.md b/doc/api/cli.md index 1b14aa45102f92..abf49fe004a95a 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1272,6 +1272,7 @@ Activate inspector on `host:port`. Default is `127.0.0.1:9229`. V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug and profile Node.js instances. The tools attach to Node.js instances via a tcp port and communicate using the [Chrome DevTools Protocol][]. +See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger. @@ -1302,6 +1303,8 @@ added: v7.6.0 Activate inspector on `host:port` and break at start of user script. Default `host:port` is `127.0.0.1:9229`. +See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger. + ### `--inspect-port=[host:]port` + +Activate inspector on `host:port` and wait for debugger to be attached. +Default `host:port` is `127.0.0.1:9229`. + +See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger. + ### `-i`, `--interactive`