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 > 8.0 Debugger] Unable to debug with error message about ms-vscode.node-debug #48946

Closed
Fghurayri opened this issue Apr 30, 2018 · 5 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@Fghurayri
Copy link

- VSCode Version:

Version 1.22.2
Commit 3aeede7
Date 2018-04-13T19:17:59Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

- OS Version:

Linux solus 4.15.17-65.current #1 SMP PREEMPT Fri Apr 20 11:36:00 UTC 2018 x86_64 GNU/Linux

Steps to Reproduce:

  1. Create a file with node code to debug. (example below).
  2. Click on debug icon.
  3. Click on the 'run' symbol to start debugging.
  4. You will be asked to select environment, select Node.js.
  5. Observe the error message.

Error message:

[ms-vscode.node-debug]: Proposed API is only available when running out of dev or with the following command line switch: --enable-proposed-api ms-vscode.node-debug

I tried running this command but still the issue isn't solved:
code-oss . --enable-proposed-api ms-vscode.node-debug

Code example:

var i = 0;
setInterval(() => {
  console.log('iteration ' + i);
  i++;
},1000)

Error message:

image

Populated launch.json after accepting the error prompt:

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceFolder}/test.js"
    }
  ]
}

Does this issue occur when all extensions are disabled?: Yes/No

Yes
code-oss . --disable-extensions

@isidorn isidorn assigned roblourens and unassigned isidorn Apr 30, 2018
@roblourens
Copy link
Member

Is this the normal stable code build, or did you build it yourself? Otherwise I don't understand why you're starting it with code-oss?

@roblourens roblourens added the info-needed Issue requires more information from poster label Apr 30, 2018
@Fghurayri
Copy link
Author

Hello Rob,
This is the official VS Code application which I have downloaded it from the official repo for my Linux distribution "Solus". https://packages.solus-project.com/shannon/v/vscode/
I can use the VS Code CLI using the code-oss command, which is the one available by default after installation.
Thanks,
Faisal

@roblourens
Copy link
Member

Ok, it looks like an unofficial build, but it should be possible to make it work. I can't unpack that eopkg file, so can you look for the product.json file, which should be in the package at a path like Resources/app/product.json. It should have a section like

"extensionAllowedProposedApi": [
		"ms-vscode.node-debug",
		"ms-vscode.node-debug2"
],

can you check that it's there?

@Fghurayri
Copy link
Author

I found that file under /usr/share/vscode/resources/app/product.json and it didn't have the section you mentioned. I added that as sudo and the debugging worked as expected!

Much appreciated, Rob!

@roblourens
Copy link
Member

I don't know who runs that repo or builds the packages but it would be great if you can send them a message so they fix that up in their build. Thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants