◐ Shell
clean mode source ↗

inspector: add NodeRuntime.waitingForDebugger event by mmarchini · Pull Request #51560 · nodejs/node

@nodejs-github-bot added c++

Issues and PRs that require attention from people who are familiar with C++.

lib / src

Issues and PRs related to general changes in the lib or src directory.

needs-ci

PRs that need a full CI run.

labels

Jan 24, 2024

benjamingr

koko1928

`NodeRuntime.waitingForDebugger` is a new Inspector Protocol event that
will fire when the process being inspected is waiting for the debugger
(for example, when `inspector.waitForDebugger()` is called). This allows
inspecting processes to know when the inspected process is waiting for a
`Runtime.runIfWaitingForDebugger` message to resume execution. It allows
tooling to resume execution of the inspected process as soon as it deems
necessary, without having to guess if the inspected process is waiting
or not, making the workflow more deterministic. With a more
deterministic workflow, it is possible to update Node.js core tests to
avoid race conditions that can cause flakiness. Therefore, tests were
also changed as following:

  * Remove no-op Runtime.runIfWaitingForDebugger from tests that don't
    need it
  * Use NodeRuntime.waitingForDebugger in all tests that need
    Runtime.runIfWaitingForDebugger, to ensure order of operations is
    predictable and correct
  * Simplify test-inspector-multisession-ws

There might be value in adding `NodeWorker.waitingForDebugger` in a
future patch, but as of right now, no Node.js core inspector tests using
worker threads are not failing due to race conditions.

Fixes: nodejs#34730

lpinca

joyeecheung

HerWayBit

marco-ippolito pushed a commit that referenced this pull request

Feb 26, 2024
`NodeRuntime.waitingForDebugger` is a new Inspector Protocol event that
will fire when the process being inspected is waiting for the debugger
(for example, when `inspector.waitForDebugger()` is called). This allows
inspecting processes to know when the inspected process is waiting for a
`Runtime.runIfWaitingForDebugger` message to resume execution. It allows
tooling to resume execution of the inspected process as soon as it deems
necessary, without having to guess if the inspected process is waiting
or not, making the workflow more deterministic. With a more
deterministic workflow, it is possible to update Node.js core tests to
avoid race conditions that can cause flakiness. Therefore, tests were
also changed as following:

  * Remove no-op Runtime.runIfWaitingForDebugger from tests that don't
    need it
  * Use NodeRuntime.waitingForDebugger in all tests that need
    Runtime.runIfWaitingForDebugger, to ensure order of operations is
    predictable and correct
  * Simplify test-inspector-multisession-ws

There might be value in adding `NodeWorker.waitingForDebugger` in a
future patch, but as of right now, no Node.js core inspector tests using
worker threads are not failing due to race conditions.

Fixes: #34730
PR-URL: #51560
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

marco-ippolito pushed a commit that referenced this pull request

Feb 26, 2024
`NodeRuntime.waitingForDebugger` is a new Inspector Protocol event that
will fire when the process being inspected is waiting for the debugger
(for example, when `inspector.waitForDebugger()` is called). This allows
inspecting processes to know when the inspected process is waiting for a
`Runtime.runIfWaitingForDebugger` message to resume execution. It allows
tooling to resume execution of the inspected process as soon as it deems
necessary, without having to guess if the inspected process is waiting
or not, making the workflow more deterministic. With a more
deterministic workflow, it is possible to update Node.js core tests to
avoid race conditions that can cause flakiness. Therefore, tests were
also changed as following:

  * Remove no-op Runtime.runIfWaitingForDebugger from tests that don't
    need it
  * Use NodeRuntime.waitingForDebugger in all tests that need
    Runtime.runIfWaitingForDebugger, to ensure order of operations is
    predictable and correct
  * Simplify test-inspector-multisession-ws

There might be value in adding `NodeWorker.waitingForDebugger` in a
future patch, but as of right now, no Node.js core inspector tests using
worker threads are not failing due to race conditions.

Fixes: #34730
PR-URL: #51560
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

marco-ippolito pushed a commit that referenced this pull request

Feb 27, 2024
`NodeRuntime.waitingForDebugger` is a new Inspector Protocol event that
will fire when the process being inspected is waiting for the debugger
(for example, when `inspector.waitForDebugger()` is called). This allows
inspecting processes to know when the inspected process is waiting for a
`Runtime.runIfWaitingForDebugger` message to resume execution. It allows
tooling to resume execution of the inspected process as soon as it deems
necessary, without having to guess if the inspected process is waiting
or not, making the workflow more deterministic. With a more
deterministic workflow, it is possible to update Node.js core tests to
avoid race conditions that can cause flakiness. Therefore, tests were
also changed as following:

  * Remove no-op Runtime.runIfWaitingForDebugger from tests that don't
    need it
  * Use NodeRuntime.waitingForDebugger in all tests that need
    Runtime.runIfWaitingForDebugger, to ensure order of operations is
    predictable and correct
  * Simplify test-inspector-multisession-ws

There might be value in adding `NodeWorker.waitingForDebugger` in a
future patch, but as of right now, no Node.js core inspector tests using
worker threads are not failing due to race conditions.

Fixes: #34730
PR-URL: #51560
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

rdw-msft pushed a commit to rdw-msft/node that referenced this pull request

Mar 26, 2024
`NodeRuntime.waitingForDebugger` is a new Inspector Protocol event that
will fire when the process being inspected is waiting for the debugger
(for example, when `inspector.waitForDebugger()` is called). This allows
inspecting processes to know when the inspected process is waiting for a
`Runtime.runIfWaitingForDebugger` message to resume execution. It allows
tooling to resume execution of the inspected process as soon as it deems
necessary, without having to guess if the inspected process is waiting
or not, making the workflow more deterministic. With a more
deterministic workflow, it is possible to update Node.js core tests to
avoid race conditions that can cause flakiness. Therefore, tests were
also changed as following:

  * Remove no-op Runtime.runIfWaitingForDebugger from tests that don't
    need it
  * Use NodeRuntime.waitingForDebugger in all tests that need
    Runtime.runIfWaitingForDebugger, to ensure order of operations is
    predictable and correct
  * Simplify test-inspector-multisession-ws

There might be value in adding `NodeWorker.waitingForDebugger` in a
future patch, but as of right now, no Node.js core inspector tests using
worker threads are not failing due to race conditions.

Fixes: nodejs#34730
PR-URL: nodejs#51560
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

lpinca added a commit to lpinca/node that referenced this pull request

Sep 7, 2024

This was referenced

Sep 7, 2024

nodejs-github-bot pushed a commit that referenced this pull request

Sep 12, 2024
Refs: #51560
PR-URL: #54827
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

aduh95 pushed a commit that referenced this pull request

Sep 12, 2024
Refs: #51560
PR-URL: #54827
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

aduh95 pushed a commit that referenced this pull request

Sep 13, 2024
Refs: #51560
PR-URL: #54827
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

aduh95 pushed a commit that referenced this pull request

Sep 13, 2024
Refs: #51560
PR-URL: #54827
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

lpinca added a commit to lpinca/node that referenced this pull request

Sep 22, 2024
Use the `NodeRuntime.waitingForDebugger` event.

Refs: nodejs#51560

targos pushed a commit that referenced this pull request

Sep 22, 2024
Refs: #51560
PR-URL: #54827
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

nodejs-github-bot pushed a commit that referenced this pull request

Sep 24, 2024
Use the `NodeRuntime.waitingForDebugger` event.

Refs: #51560
PR-URL: #55058
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

targos pushed a commit that referenced this pull request

Sep 26, 2024
Refs: #51560
PR-URL: #54827
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

targos pushed a commit that referenced this pull request

Oct 2, 2024
Refs: #51560
PR-URL: #54827
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

targos pushed a commit that referenced this pull request

Oct 2, 2024
Refs: #51560
PR-URL: #54827
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

targos pushed a commit that referenced this pull request

Oct 4, 2024
Use the `NodeRuntime.waitingForDebugger` event.

Refs: #51560
PR-URL: #55058
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

louwers pushed a commit to louwers/node that referenced this pull request

Nov 2, 2024
Refs: nodejs#51560
PR-URL: nodejs#54827
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

louwers pushed a commit to louwers/node that referenced this pull request

Nov 2, 2024
Use the `NodeRuntime.waitingForDebugger` event.

Refs: nodejs#51560
PR-URL: nodejs#55058
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

tpoisseau pushed a commit to tpoisseau/node that referenced this pull request

Nov 21, 2024
Refs: nodejs#51560
PR-URL: nodejs#54827
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

tpoisseau pushed a commit to tpoisseau/node that referenced this pull request

Nov 21, 2024
Use the `NodeRuntime.waitingForDebugger` event.

Refs: nodejs#51560
PR-URL: nodejs#55058
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

lpinca added a commit to lpinca/node that referenced this pull request

Nov 28, 2024

aduh95 pushed a commit that referenced this pull request

Jan 2, 2025
Refs: #54827
Refs: #51560
PR-URL: #56050
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>

aduh95 pushed a commit that referenced this pull request

Jan 31, 2025
Refs: #54827
Refs: #51560
PR-URL: #56050
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>

marco-ippolito pushed a commit that referenced this pull request

Mar 6, 2025
Refs: #54827
Refs: #51560
PR-URL: #56050
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>

marco-ippolito pushed a commit that referenced this pull request

Mar 6, 2025
Refs: #54827
Refs: #51560
PR-URL: #56050
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>

marco-ippolito pushed a commit that referenced this pull request

Mar 6, 2025
Refs: #54827
Refs: #51560
PR-URL: #56050
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>