You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Darwin shimaryuuheinoMac-mini.local 24.0.0 Darwin Kernel Version 24.0.0: Mon Aug 12 20:52:12 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6020 arm64
Subsystem
No response
What steps will reproduce the bug?
Run this code with --inspect-brk and inspect it using Chrome DevTools.
const { Worker } = require('worker_threads');
const worker = new Worker('console.log("Worker thread is running")', { eval: true });
console.log('Main thread is running');
process.on('exit', () => {
console.log('Main thread is exiting');
});
worker.on('exit', (message) => {
process.exit();
});
How often does it reproduce? Is there a required condition?
constantly
What is the expected behavior? Why is that the expected behavior?
Debugger listening on ws://127.0.0.1:9229/a33bf964-bb8c-432a-9d6b-191d26bef40a
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Main thread is running
Worker thread is running
Main thread is exiting
Waiting for the debugger to disconnect...
What do you see instead?
The worker does not execute and stops
Debugger listening on ws://127.0.0.1:9229/a301d300-fc77-40c7-b5a2-03042079e8b0
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Main thread is running
Additional information
It seems that the parent thread's --inspect-brk setting is inherited.
https://nodejs.org/api/worker_threads.html#new-workerfilename-options
According to the documentation, the child threads inherit the parent thread's options by default, so this might be a feature request rather than a bug report.
However, it was working as expected in at least version 22.1.0.
In any case, I want to be able to run --inspect-brk without needing to add additional options to the worker.
The text was updated successfully, but these errors were encountered:
Version
v23.4.0
Platform
Subsystem
No response
What steps will reproduce the bug?
Run this code with --inspect-brk and inspect it using Chrome DevTools.
How often does it reproduce? Is there a required condition?
constantly
What is the expected behavior? Why is that the expected behavior?
What do you see instead?
The worker does not execute and stops
Additional information
It seems that the parent thread's
--inspect-brk
setting is inherited.https://nodejs.org/api/worker_threads.html#new-workerfilename-options
According to the documentation, the child threads inherit the parent thread's options by default, so this might be a feature request rather than a bug report.
However, it was working as expected in at least version 22.1.0.
In any case, I want to be able to run
--inspect-brk
without needing to add additional options to the worker.The text was updated successfully, but these errors were encountered: