From aabafbc28ff4bfe5eb73d174beb51b03cd86fd5f Mon Sep 17 00:00:00 2001 From: Shima Ryuhei <65934663+islandryu@users.noreply.github.com> Date: Mon, 12 May 2025 22:25:00 +0900 Subject: [PATCH] inspector: support for worker inspection in chrome devtools Fixes: https://github.com/nodejs/node/issues/56343 PR-URL: https://github.com/nodejs/node/pull/56759 Reviewed-By: Chengzhong Wu Reviewed-By: James M Snell --- doc/api/cli.md | 11 ++ src/inspector/main_thread_interface.h | 5 + src/inspector/node_inspector.gypi | 4 + src/inspector/node_protocol.pdl | 25 ++++ src/inspector/target_agent.cc | 136 ++++++++++++++++++ src/inspector/target_agent.h | 75 ++++++++++ src/inspector_agent.cc | 53 +++++-- src/inspector_io.cc | 71 +++++++-- src/node_options.cc | 3 + src/node_options.h | 1 + test/fixtures/inspect-worker/index.js | 3 + test/fixtures/inspect-worker/worker.js | 4 + test/parallel/test-inspector-worker-target.js | 75 ++++++++++ 13 files changed, 443 insertions(+), 23 deletions(-) create mode 100644 src/inspector/target_agent.cc create mode 100644 src/inspector/target_agent.h create mode 100644 test/fixtures/inspect-worker/index.js create mode 100644 test/fixtures/inspect-worker/worker.js create mode 100644 test/parallel/test-inspector-worker-target.js diff --git a/doc/api/cli.md b/doc/api/cli.md index 6f984926a62..f8e13b7b05d 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1236,6 +1236,17 @@ added: v22.4.0 Enable experimental [`Web Storage`][] support. +### `--experimental-worker-inspection` + + + +> Stability: 1.1 - Active Development + +Enable experimental support for the worker inspection with Chrome DevTools. + ### `--expose-gc`