microsoft / vscode-debugadapter-node

Debug adapter protocol and implementation for VS Code.
Other
273 stars 79 forks source link

Upgrade node to the latest version used in VSC stable #226

Closed karrtikr closed 4 years ago

karrtikr commented 4 years ago

Hi Python extension VS Code dev here 👋

VS Code is shipping with Node 12.4.0, due to which we have to now run the tests under that same version instead of 10.*. Some of our tests are dependent on this package, and as it still uses the old node version, tests fail. (https://github.com/microsoft/vscode-python/issues/9383)

Please upgrade the node version you're shipping with.

roblourens commented 4 years ago

Sorry, I'm not sure exactly what you are asking for. This is just a library that will run in whatever version you run it in. Does it do something that doesn't work in Node 12?

karrtikr commented 4 years ago

I see, sorry I didn't know about this. Actually we had this line in the test,

await Promise.all([
    debugClient.configurationSequence(),
    debugClient.launch(<launchArgs>),
    debugClient.waitForEvent('initialized')
]);

which fails with Error: spawn ENOMEM at <vscode-python>\node_modules\vscode-debugadapter-testsupport\src\protocolClient.ts:76:20 on upgrading node version to 12. It uses the package APIs, so I figured it might be happening because the package is still using the old node version.

Can you see why upgrading node might lead to failure for this sequence of API calls?

roblourens commented 4 years ago

spawn ENOMEM I dunno, is your system almost out of memory?

karrtikr commented 4 years ago

That's what the error says. But I was wondering what made the package (\src\protocolClient.ts:76:20) throw that error, I think it's coming when call to debugClient.launch(<launchArgs>) is made.

roblourens commented 4 years ago

I don't think so. This library just passes the commands along to your debug adapter and is pretty simple. So I would look at your debug adapter's code more closely. Like figure out exactly what is going wrong first, is your debug adapter crashing or is it the runtime that your DA spawns, etc.

karrtikr commented 4 years ago

I see. As we're not sure of what the cause is exactly, we can probably close this.