-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
Attachment fails on Node 8 #102166
Comments
Can you please collect a trace log using the following instructions?
/needsMoreInfo |
I'm sorry, I don't know what else to report. w/o Debugging and console.log, VS Code is almost useless to me. I don't know what else you need. I did a trace and sent that to the address above. |
Just got the emailed logs. It looks like we aren't able to attach a websocket to the launched process, so indeed nothing will work. This is a new issue to me. I've created a build with additional logging, if you could run it and the complete output that would be superbly useful. (Our normal logs here aren't sufficient, since we can't attach to the process to get them.)
Until we get this fixed, you can use the old debugger by setting Thanks very much for your help with diagnosing this 🙂 |
Thanks, |
Hm, okay. All our info seems to line up. Node echoes the websocket address, and we start trying to create a websocket connection to it. Node says it attaches the debugger, but the websocket never emits an 'open' or 'error' event. Is there anything on your machine you suspect could be interfering with network traffic like this? Proxies, antiviruses, etc? |
I do have Bitdefender installed, but I just turned that off and tried it again and that didn't make a difference. To my knowledge there have been no other updates installed today except VS Code 1.47, it was working fine yesterday. BTW, setting debug.javascript.usePreview: false seems to fix the problem. |
I am on a Mac, and I frequently have to turn something on in the Privacy area to allow something to work. I wonder if there is something in that area? |
Ah. Hm. I know bitdefender, at least on Windows, does do request interception. Unsure if turning that off actually turns off interception or just stops filtering data. Although I tried installing the Bitdefender Antivirus trial on OSX Mojave and things still worked. It might be the firewall (togglable in preferences) but again I run with that on without issues. If you have some time, here's a build of the debugger hardcoded to use port 9229, like the old Node debugger did. Maybe that port is allowlisted somewhere where other random ports are not. If this build does work then we can be quite certain it's something on the network. https://memes.peet.io/img/js-debug-issue-102166-again.vsix |
Ok, I tried that. The output of that is as follows, however, the break point still says "Unbound breakpoint": env NODE_ENV=development 'NODE_OPTIONS=--require /Users/jesse/.vscode/extensions/ms-vscode.js-debug-1.47.3/src/bootloader.bundle.js ' 'VSCODE_INSPECTOR_OPTIONS={"inspectorIpc":"/var/folders/9j/jnp0yfj54qv7xfppngpct51m0000gn/T/node-cdp.96804-2.sock","deferredMode":false,"waitForDebugger":"","execPath":"/usr/local/bin/node","onlyEntrypoint":false,"fileCallback":"/var/folders/9j/jnp0yfj54qv7xfppngpct51m0000gn/T/node-debug-callback-6c4886b023b53573"}' /usr/local/bin/node ./app.js |
Hm. This kind of stumps me. Two more queries you could try:
I really appreciate your help and willingness to diagnose this! |
Whoops, didn't mean to hit the close button |
Thank you @dlgenterprises , |
I'm using Node version 8.16.2 As for "...try attaching to that port using an 'attach'...", I'm not very clear on what you want me to do there. Am I modifying my existing launch.json some way, or creating a new Launch, or doing something else? |
Ahh, that's the key! I was able to reproduce running that version of Node as well. I should be able to have a fix for it shortly. Also, just in case you didn't know, Node 8 is EOL as of April. If there's nothing keeping you there, updating to Node 14 gets you lots of nice new features and performance 🙂 |
We have several old node modules that we rely on that won't run in anything newer than 8. We know that is a problem, and we will have to look for some alternatives at some point, but that's the only thing keeping us in Node 8 for now. Thanks, though and this just gives us another reason to start looking more quickly for an alternative. |
Fixed in the linked commit. How can you fix your debugging? Either:
What happened? We used Why did it happen? We're aware that some code will run in the user's Node version, and we have our TypeScript options set for that -- targeting ES2017 in our lib and target parameters, which is advertised to map to Node 8. However, Promise.finally was present in those typings, even though Node 8 didn't have it. How can we prevent this? Our test suite runs against Node 12 -- previous version of Node don't have some features that we (optionally) need to build and test new features. I've now added an additional 'minspec' build that runs select tests against Node 8 to ensure sanity https://dev.azure.com/vscode/VS%20Code%20debug%20adapters/_build/results?buildId=48413&view=logs&j=a8e58cb5-ff8c-58f5-08fa-0c710542c7b6 Longer term we will need a policy around what versions of Node we support. In js-debug we dropped support for versions <7, since they run an entirely different protocol. Going forward, what should we do -- match Node LTS? LTS + 1 year? Or usage based. |
1.47 and node 12.8.1 will |
@sreed4 please collect a trace log using these instructions:
|
@sreed4 thanks for the log! It looks like you have |
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! |
Steps to Reproduce:
1.Run app and first thing I notice is console.log doesn't show their usual messages. In my app usually 2 messages show up, "Express running on port 3000", and "Settings updated..." They no longer appear.
2.Run app and I notice that all the break points I set turned to hollow circles, and they do not stop when the code is executed. You can see the screen shot where the break point has turned to a hollow circle. Hovering over the break point says, "Unbound breakpoint".
3. These issues only started after I was automatically updated to 1.47 today.
Does this issue occur when all extensions are disabled?: Yes/No (don't know, I tried running this and got "zsh: command not found: code"
The text was updated successfully, but these errors were encountered: