Skip to content

Prepare for node -> node2 transition #19650

@roblourens

Description

@roblourens

Since the legacy node debug protocol is on its way out, we need to continue preparing a seamless transition to the inspector debug protocol.

Status:

Possible February plan:

  • Option 1:
    • Wrap node and node2 in a single debug adapter. It checks the node version to be launched or attached to, and delegates to the proper debug adapter, using node2 when possible.
    • It also registers 'node_legacy' to force the legacy debug adapter
  • Option 2:
    • Change 'node' to detect the node version and warn the user to change the type to node2 if it's after 8
    • Then at some point in the future, rename node2 to node

It would be good to have a seamless experience like in option 1 - a user doesn't care which debug protocol they use. That should be our job, if possible. There are some issues to deal with though.

  • When runtimeExecutable is specified, we will have to leave it up to the user. We can't always figure out its node version. It might be a script or something that isn't node. It might be electron, which ships a version of node 6.5 that doesn't include --inspect. We can probably figure out what this failure looks like, and give a helpful warning.
  • When attaching, we should be able to figure out which protocol it's using. One easy difference is that under the inspector protocol, we can make an http request to http://localhost:port.

Other things to do:

FYI @weinand @joshgav

Metadata

Metadata

Labels

debugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions