Skip to content

Unable to access Async local storage state when running code in debug mode #44415

Description

@thetutlage

Version

v18.8.0

Platform

Darwin xxxxx.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64

Subsystem

No response

What steps will reproduce the bug?

The issue has been extracted to this repo https://github.com/thetutlage/node-als-debugging that you can run without any dependencies. The README covers the steps to follow. However, I am happy to provide more info (if needed)

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

You can reproduce it every time. The only given condition is to run the code in debug mode with --inspect flag.

What is the expected behavior?

The Async local storage should work consistently regardless of it is in debug mode or not

What do you see instead?

Getting undefined when trying to access the ALS store while running the code in debug mode with --inspect flag.

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions