nodejs / node

Node.js JavaScript runtime āœØšŸ¢šŸš€āœØ
https://nodejs.org
Other
107.65k stars 29.62k forks source link

Debugger docs: the expired parts āš°šŸ§¹ #54078

Open worstpractice opened 3 months ago

worstpractice commented 3 months ago

Affected URL(s)

https://nodejs.org/docs/latest/api/debugger.html#v8-inspector-integration-for-nodejs

Description of the problem

As of this writing, the final two sentences of the final subsection of the Debugger docs consist of the following two statements:

  1. Chrome DevTools doesn't support debugging worker threads yet.
    • Good intentions notwithstanding, time phrases tied to the present (e.g: "yet") age like milk.
    • Even if the date of writing was known, the assertion itself remains unsourced.
      • This unfortunate omission only makes the immediate next step (of Googling about to try and figure out if the purported lack of support is still the case) that much harder.
  2. ndb can be used to debug them.

How to fix (šŸ¤·ā€ā™‚ļø)

Deleting the final two sentences could perhaps be enough?

On a side note: making the reader aware of the existence of v8.dev (which covers many advanced use cases) could perhaps be of partial service to the goal of documenting the aforementioned advanced use cases. šŸ’”

rstagi commented 3 months ago

the assertion itself remains unsourced

There would be an open issue for the Chrome DevTools, which has even been marked as Won't fix. So I agree it would be best to probably remove any reference to it.

ndb could still be of great value though, maybe it's worth keeping it and just flagging it as deprecated(?)

AFAIK, the only alternatives to debug Node.js worker threads effectively are:

Not sure if they're worth mentioning in the docs though šŸ˜•

joyeecheung commented 3 months ago

I think mentioning VSCode for debugging workers in the docs would be helpful at least. Regarding the Chromium issue it seems to get closed due to inactivity by the bot, they still seem to be open to fix it (on a side note Chromium DevTools team is currently looking into enabling the network tab for Node.js DevTools https://issues.chromium.org/issues/353924015 so supporting Node-specific domains is something they are willing to accept) , just don't have the cycles to prioritize this - if someone submits a CL or starts a design doc or just open a new issue in the Chromium issue tracker, it can get some new momentum going.