Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Evolve node2 and node into a single node debugging experience #20991

Closed
3 tasks done
weinand opened this issue Feb 21, 2017 · 0 comments
Closed
3 tasks done

Test: Evolve node2 and node into a single node debugging experience #20991

weinand opened this issue Feb 21, 2017 · 0 comments
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues testplan-item
Milestone

Comments

@weinand
Copy link
Contributor

weinand commented Feb 21, 2017

Test for #19650:
complexity: 2

In this milestone we've started to fold the two node debug extensions 'node-debug' and 'node-debug2' into one (conceptual) extension and eliminated the need for dealing with two debug types ('node' and 'node2'). We call it 'conceptual' extension because there are still two extensions, but we try to hide the 'node-debug2' extension so that the user only sees 'node-debug'. The functionality provided by 'node-debug2' is fully available through 'node-debug' (and the associated debug type 'node').

In this milestone it works like this:

The launch configuration for 'node' supports a new attribute 'protocol' which controls how node-debug uses the old node debugger or the new node debugger.

  • legacy: node-debug acts like the old node debugger by using the (obsolete) v8 debugger protocol (supported by node versions < v8). In this milestone this is the default if the 'protocol' attribute is missing or if the auto-detection fails.
  • inspector: node-debug acts like the new node debugger ('node2') by using the inspector protocol (supported by node versions >= 6.3, but not yet supported by electron).
  • auto: tries to automatically detect the protocol. For configurations of request type 'launch' and if no 'runtimeExecutable' is specified, we try to determine node's version by running node from the PATH with an '--version' argument. If the version is >= 6.9 the new 'inspector' protocol is used. For configurations of request type 'attach' we try to connect with the new protocol and if this works, we use the 'inspector' protocol. We only switch to the new inspector protocol for versions >= 6.9 because of severe problems in earlier versions.

Verify:

  • that the 'protocol' attribute works as described above. Try with two versions of node: one that supports only the old protocol and one that supports the old and the new (a version that only supports the new protocol is not yet available). Try with Electron (which only supports the old protocol even in recent versions).
  • that the 'auto' mode works reasonable. We will make this mode the default in the future, so we'll have to make sure that users do not run into lots of issues.
  • that if protocol 'auto' is used, a message appears in the debug console that explains how the decision was made.
  • the "Node.js v6.3+ (experimental)" does not appear in launch config snippets or in the debug environment selector that appears when there is no launch.json.
  • the use of debug type 'node2' in launch configs is flagged as deprecated.

Tipps:

  • for testing the 'attach' case, launch a node program for the new inspector protocol with node --inspect or node --inspect=5555 or node --inspect --debug-brk=5555
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues testplan-item
Projects
None yet
Development

No branches or pull requests

5 participants