Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

JavaScript debug statements #18851

Copy link
Copy link
@BridgeAR

Description

@BridgeAR
Issue body actions

I personally would some times like to have some debug calls for internal APIs e.g. the internal errors. It would make the API easier to use by just verifying the input but only when run by our test suite. We are all human and make mistakes. So it should behave similar to a DCHECK in C++ but just in JS. Because I would not want to have those checks run in production.

Do we want to introduce something like that? (Or do we actually already have that and I just missed that?)

I guess there are two ways of implementing something like that:

a) A macro
b) A simple if (env.NODE_DEBUG_INTERNAL === 'true') {}

What do others @nodejs/collaborators think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    metaIssues and PRs related to the general management of the project.Issues and PRs related to the general management of the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.