microsoft / microsoft/nodejstools

Breakpoint not catching when upgrading from Node 8 to Node 10.

Open
#2,237 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.8k
Forks
355
PR merge metrics
No merged PRs in 30d

Description

Breakpoints are not catching right away after I upgraded from Node 8 to Node 10.

When Node 8 was installed I could set a breakpoint on a global statement and it would hit. Now, AFTER node runs first, I have to remove and re-add a breakpoint. Once doing so all other breakpoints on the opened code window start working also. It seems none of the breakpoints get registered properly BEFORE node runs the app.

image

Here you can see the debugger statement causes the debugger to hit there only, while all breakpoints do not work. Removing and adding any one breakpoint fixes all of them.

Rolling back to Node 8.16.1 fixes the issue and everything works as expected.

Expected Behavior

Global scope breakpoint hit.

Actual Behavior

Breakpoint is not hit.

  • OS: Windows 10
  • Visual Studio Version: VS 2017 15.9.16
  • Node.js Version: 10.16.3
Steps to Reproduce
  1. Create new node project in Visual Studio.
  2. Download node installer to get the latest stable release of node, which is 10.16.3. Upgrade node 8 to node 10.
  3. Upgrade npm to the latest: npm install -g npm stable
  4. Upgrade node installed via NPM to match the downloaded version (if necessary): npm install -g node@10.16.3
  5. Create a module with a global statement and set a breakpoint on it.
  6. Breakpoint is never hit.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the breakpoint behavior in a new Node.js project using Windows 10, Visual Studio 2017 15.9.16, and Node.js 10.16.3, following the listed upgrade steps. Compare breakpoints set before startup with the debugger statement and the Node 8.16.1 behavior; done means global-scope breakpoints are caught without removing and re-adding them.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.