Skip to content

Different behavior of { a: 1 } in the REPL and the debugger #46808

Description

@tuannd89

Version

v19.7.0

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

Evaluating { a: 1 } in the REPL and the debugger have different result

% node
> { a: 1 }
{ a: 1 }
% node inspect app.js
debug> { a: 1 }
1

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

Always

What is the expected behavior?

Like REPL, the result of debugger will be

% node inspect app.js
debug> { a: 1 }
{ a: 1 }

What do you see instead?

% node inspect app.js
debug> { a: 1 }
1

Additional information

The results of { a: 1 } in other runtimes:

  • ChromeDevTools: { a: 1 }

  • Safari WebInspector: { a: 1 }

We have a similar bug (#45964) but we have not fixed yet and it was closed

Metadata

Metadata

Assignees

No one assigned

    Labels

    debuggerIssues and PRs related to the Node.js command-line debugger.replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions