nodejs / nodejs/node

Chrome devtools console method autocompletion for node is not working

オープン
#56,637 コメント 10 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

inspector
主要言語
JavaScript
スター
122k
フォーク
37.3k
平均マージ
4日 2時間
マージ済み PR(30日)
283

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Node v22.13.0でnode --inspect、Chrome 132、および専用のDevToolsコンソールでglobal.を使って再現する。これをnode --trace-side-effect-free-evaluate --inspectと比較し、inspectorのオートコンプリートにおける副作用評価の経路を追跡する。完了条件は、global.に対して再びメソッドの補完が表示されること。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
devtools, javascript, nodejs
領域
developer-experience, devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。