nodejs / nodejs/node

Chrome devtools console method autocompletion for node is not working

Aperta
#56,637 10 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

inspector
Lingua principale
JavaScript
Stelle
122k
Fork
37.3k
Merge medio
4g 2h
PR unite (30g)
283

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riprodurre con Node v22.13.0 usando node --inspect, Chrome 132 e global. nella console DevTools dedicata. Confrontare con node --trace-side-effect-free-evaluate --inspect e tracciare il percorso di valutazione degli effetti collaterali dell’autocompletamento dell’inspector; l’attività è completata quando ricompaiono i completamenti dei metodi per global..

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
devtools, javascript, nodejs
Ambito
developer-experience, devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
52/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.