Skip to content

--enable-source-maps does not work in worker_threads #34898

@cspotcode

Description

@cspotcode
  • Version: v14.8.0
  • Platform: Linux (Ubuntu)
  • Subsystem: worker_threads and source-maps

What steps will reproduce the bug?

Here is a complete, minimal reproduction executed on Github Actions.
https://github.com/cspotcode/repros/tree/node-source-map-worker-thread

  1. Create a worker_thread
  2. In the worker_thread, execute a .js file with a sourcemap.
  3. Log new Error().stack within the worker_thread. See that the stack does not have sourcemap information.
  4. Run exactly the same code in the main thread to see that the stack has sourcemap information, proving that the sourcemap is valid.

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior?

Sourcemap information is included in a stack trace within a worker_thread if that information is included in the stack traces in the main thread.

What do you see instead?

Worker thread stacks do not include sourcemap information even though main thread stacks do.

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    workerIssues and PRs related to Worker support.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions