Debugging node app pauses unexpectedly when a Worker is created #125451
Labels
bug
Issue identified by VS Code Team member as probable bug
debug
Debug viewlet, configurations, breakpoints, adapter issues
good first issue
Issues identified as good for first-time contributors
upstream
Issue identified as 'upstream' component related (exists outside of VS Code)
verified
Verification succeeded
Milestone
Issue Type: Bug
After updating my VS Code, my debugging experience became unpredictable and would pause unexpectedly. I've traced down the root cause in my code to an instantiation of a node
Worker
(from theworker_threads
module).I have created a simple reproducible scenario with instructions here.
The problem manifests when a worker is created with an
env
option that doesn't includeNODE_OPTIONS
in the environment variable. (NOTE: I wanted the worker thread to act as a sort of "safe" sandbox, with no knoweldge of the owning thread's environment settings):Steps to Reproduce:
launch.json
)Worker1
stack (without any breakpoints set) when it creates thenew Worker
Workaround:
new Worker
with anenv
option, addNODE_OPTIONS
to theenv
object.NOTE: I am using webpack5 to build the code, following their guidance for instantiating worker threads
VS Code version: Code 1.56.2 (054a929, 2021-05-12T17:13:13.157Z)
OS version: Windows_NT x64 10.0.17763
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Extensions (6)
A/B Experiments
The text was updated successfully, but these errors were encountered: