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

node.js breakpoints become "unbound breakpoint" #581

Closed
sphui opened this issue Jul 11, 2020 · 14 comments
Closed

node.js breakpoints become "unbound breakpoint" #581

sphui opened this issue Jul 11, 2020 · 14 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s)

Comments

@sphui
Copy link

sphui commented Jul 11, 2020

Describe the bug
node.js breakpoints become "unbound breakpoint".

To Reproduce
Steps to reproduce the behavior:
After upgrade to 1.47, just open my node.js project, and start debugging, all breakpoints said to be "unbound breakpoints"

Log File

VS Code Version: 1.47

Additional context
I revert to 1.46, all breakpoints works well

@sphui sphui added the bug Issue identified by VS Code Team member as probable bug label Jul 11, 2020
@connor4312
Copy link
Member

Can you please share the log file using these instructions?

If you're able to, add "trace": true to your launch.json and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.

⚠️ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to connor@xbox.com

@connor4312 connor4312 added the info-needed Issue requires more information from poster label Jul 11, 2020
@connor4312
Copy link
Member

connor4312 commented Jul 11, 2020

If you are using Node 8, this may be microsoft/vscode#102166. See solution here: microsoft/vscode#102166 (comment)

Let me know and I will reopen if this is not your issue!

@connor4312 connor4312 added *duplicate Issue identified as a duplicate of another issue(s) and removed info-needed Issue requires more information from poster labels Jul 11, 2020
@sphui
Copy link
Author

sphui commented Jul 12, 2020

Yes, my node version is 8.16. thanks a lot

@connor4312
Copy link
Member

A fix for this issue has now been released in VS Code 1.47.2. If you previously had to opt-out of the new debugger, you should be safe to turn it back on. Thanks again for the report!

@watcher00090
Copy link

Hey @connor4312, I'm also getting unbound breakpoints while trying to attach to a nodeJS process. Would you be willing to take a look at my logs? I've been trying to attach the debugger to a nodeJS process which gets started by an Elixir web endpoint, but unfortunately all my breakpoints are greyed out, and I'm not sure what's going wrong. I did get a warning like "it's taking a long time to set up breakpoints", but I'm not sure what's generating this.
vscode-debugadapter-18.json.gz
Thank you,
James

@connor4312
Copy link
Member

@watcher00090 it looks like you're trying to debug your build process rather than the running application. E.g. none of the files in /Users/jamespedersen/workspace/orcasite-staging/assets/src/components are loaded by the process you're debugging.

@watcher00090
Copy link

watcher00090 commented Oct 14, 2020

Hey @connor4312, thanks for getting back to me about this! Haha, that was a silly thing to do. The thing is, that's the only NodeJS process that's running on my machine, so I'm not sure what else to attach it to. Is this the right way to debug frontend code that gets served from a non-nodeJS web endpoint?

Also, I tried using the 'Launch Chrome' configuration after the Elixir web endpoint is started elsewhere, but I'm still getting unbound breakpoints in my frontend code. Log is attached, maybe you'd be willing to take a look at it and point me in the right direction?

vscode-debugadapter-25.json.gz

@offero
Copy link

offero commented Sep 1, 2021

I'm having the same issue now. VSCode Insiders 1.60.0-insider
Node 8.15 application
I used to be able to set breakpoints okay. I seemingly cannot switch back to the old debugger; the config option is no longer available.

@sorjef
Copy link

sorjef commented Sep 9, 2021

After upgrade to 1.60.0 Node 8.11 application debugging does not work.

Fixed with "legacy-node" type. @offero check this out. It's mentioned here https://code.visualstudio.com/updates/v1_60#_javascript-debugging

@connor4312
Copy link
Member

connor4312 commented Sep 9, 2021

We strongly recommend upgrading off Node 8. The version of V8 included in Node 8 has bugs with debugging, and Node 8 itself reached end of life in 2019 and has not received security patches since then.

Node 10 also reached end of life this year. The most recent stable version of Node.js is 16.x.

@Thomalexa
Copy link

HI all,

I'm a new developer and I'm trying to debug and work with an existing nodejs app written in v 8.10. How do I upgrade the application to a stable version of Nodejs to get the debugging to work? If any of you have any tips or sites that would help a new dev with basic steps like:

  1. Determining node versions on existing applications.
  2. How to debug apps.
  3. How to upgrade old code to new code.

I would be eternally grateful. I've been trying to learn this on my own and don't have anyone at work to help. Our old dev left for a new job and I'm trying to fill the void until we get a seasoned developer on board.

Thank you,

Thomas

@connor4312
Copy link
Member

Generally you can just install the newer Node version without any code changes. The exception is if you have modules that have native dependencies that might be outdated and only work with old Node versions, but these will generally fail either on installation or right when they're require'd during app startup.

Here's the documentation on general node debugging: https://code.visualstudio.com/docs/nodejs/nodejs-debugging

@Thomalexa
Copy link

Connor,

I used nvm to upgrade to Node v 17. I launched my application, went to the package.json file, under Scripts, I hovered over start, and selected "run script" to get the server piece running. For the client piece, I hovered over it and chose "debug." The breakpoints that I picked in the js file are still showing that it's "unbound." When I go through the application, it doesn't function right as a break point and let me step through the data.

Am I going about this correctly or am I doing something wrong?

Thank you,

Thomas

@connor4312
Copy link
Member

Please open a new issue and include the details which the template asks for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

6 participants