nodejs / nodejs/node

Chrome devtools console method autocompletion for node is not working

Open
#56,637 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

inspector
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

Version

v22.13.0

Platform
Microsoft Windows NT 10.0.19045.0 x64
Subsystem

No response

What steps will reproduce the bug?
  1. open Chrome 132.0.6834.84 and load chrome://inspect
  2. open dedicated devtools for node
  3. run "node --inspect"
  4. wait for node to connect to devtools
  5. enter "global." in the devtools console
  6. the autocompletion method list does not pop up
How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

The autocompletion method list is expected to pop up as it does for browser objects and as it used to for node:

Image

What do you see instead?

No autocomplete method popup.

Additional information

Since this is working in Chrome 113, it appeared as a Chrome issue and was submitted on the Chrome bug tracker, but was closed with the following response:

https://issues.chromium.org/u/2/issues/390205856#comment5

This is a Node.js issue. I can reproduce this down to Node 14, but with Node 12 autocompletion works as expected.

The way autocompletion of object properties works is that we evaluate the input, but abort if this evaluation may cause a side effect. Without side effect, we get the object properties and offer these properties as autocomplete options.

From Node 14, side effect check fails. You can easily check this by running Node with node --trace-side-effect-free-evaluate --inspect.

I would suggest you file an issue on the Node issue tracker.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce with Node v22.13.0 using node --inspect, Chrome 132, and global. in the dedicated DevTools console. Compare this with node --trace-side-effect-free-evaluate --inspect and trace the inspector autocomplete side-effect evaluation path; done means method completions appear for global. again.

Written by the indexing model from the issue text.

Assessment

Tech stack
devtools, javascript, nodejs
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.