Skip to content

Test debugging opens a separate readonly file #1084

@giacomorebonato

Description

@giacomorebonato

Runtime

NodeJS

Runtime version

22.13.0

Module version

@hapi/[email protected]

Used with

Hapi

Any other relevant information

I find myself in situations where it's very useful to debug unit tests with VSCode and placing breakpoints in the code.

  • I am also using TypeScript, hence the flag --typescript is passed
  • --sourcemaps are also enabled

How can we help?

When I run the test with --inspect it stops in a transpiled readonly copy of the file that I can't edit. For example in the file I see all the require() wrapped by __importDefault(require()).

I tried to provide basic reproduction steps, but the problem doesn't appear.
Do you have any clues what could generate this issue in my current project?

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportQuestions, discussions, and general support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions