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

Debugger does not work when running Node.js on an unsupported operating system #108222

Closed
hp8wvvvgnj6asjm7 opened this issue Oct 7, 2020 · 18 comments · Fixed by microsoft/vscode-js-debug#791
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues good first issue Issues identified as good for first-time contributors insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@hp8wvvvgnj6asjm7
Copy link

hp8wvvvgnj6asjm7 commented Oct 7, 2020

I'm here because I spent over 6 hours trying to get any feedback from the debugging tools in vscode.
even tried a fresh install of vscode, moved all config, extension and appdata folders

I went trough many configuration settings for the launch.json, none worked.
No debugging method worked. The debugger just doesn't seem to launch.

If someone can give me some info on how to troubleshoot this I would be thankful.

I feel like this is the reason why many devs still use console.log

  • VSCode Version: 1.49.2
  • OS Version: Win7x64

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

@connor4312
Copy link
Member

Please grab some logs

/jsDebugLogs

@hp8wvvvgnj6asjm7
Copy link
Author

the debugger doesn't work on win7 x64 its utterly non-functioning - after 6 hours and countless examples, the variables box remains empty. Used breakpoints, tried typescript examples, node js examples, simplest possible, many configs, fresh vscode install. None worked. Please help.

I am using the portable builds of node and vscode, but had no issues with them before. Only the debugging never worked.
Every time I tried to use the debugger It never displayed anything and I thought it was too complicated, but now its clear that its a bug.

It seems like auto-attach doesn't work either.

I just tried to start the debugger on two different machines using this example: https://github.com/branflake2267/debugging-service-typescript
No success with it

@connor4312
Copy link
Member

Thanks for the logs. Do you have any antivirus or firewall running locally? We've seen issues where these sometimes block the debug connection.

@connor4312
Copy link
Member

connor4312 commented Oct 7, 2020

You want to make sure that node.exe is able to connect back to the local pipe server which VS Code sets up for it

@connor4312
Copy link
Member

connor4312 commented Oct 7, 2020

Here's a build with some additional logging:

  1. Download this build and install it via the Install from VSIX command
  2. Add "console": "integratedTerminal" to your launch.json config
  3. Run and share the log information printed to your debug terminal

Also, please set auto attach to "disabled", then reopen the terminal, to eliminate some variables

@connor4312
Copy link
Member

That output indicates js-debug v1.50.0 is running. The vsix I sent is 1.49.8 -- you may need to disable auto updating extensions if VS Code keeps string to update you

@connor4312
Copy link
Member

Can you go ahead and hit the "reload" button in the lower right to make sure the update takes?

@hp8wvvvgnj6asjm7
Copy link
Author

hp8wvvvgnj6asjm7 commented Oct 7, 2020

image


C:\Users\Auteroid\Desktop\debugging-service-typescript> cmd /C "set "NODE_OPTIONS=--require c:/Users/Auteroid/.vscode/extensions/ms-vscode.js-debug-1.49.8/src/bootloader.bundle.js --inspect-publish-uid=http" && set "VSCODE_INSPECTOR_OPTIONS={"inspectorIpc":"\\\\.\\pipe\\node-cdp.5848-1.sock","deferredMode":false,"waitForDebugger":"","execPath":"C:\\Users\\Auteroid\\Apps\\node\\node.exe","onlyEntrypoint":false,"autoAttachMode":"always","fileCallback":"C:\\Users\\Auteroid\\AppData\\Local\\Temp\\node-debug-callback-f63952c108b058bd"}" && C:\Users\Auteroid\Apps\node\node.exe .\dist\launchers\launch_service.js "
runtime.launch Bootloader imported {
  env: {
    inspectorIpc: '\\\\.\\pipe\\node-cdp.5848-1.sock',
    deferredMode: false,
    waitForDebugger: '',
    execPath: 'C:\\Users\\Auteroid\\Apps\\node\\node.exe',
    onlyEntrypoint: false,
    autoAttachMode: 'always',
    fileCallback: 'C:\\Users\\Auteroid\\AppData\\Local\\Temp\\node-debug-callback-f63952c108b058bd'
  },
  args: [
    'C:\\Users\\Auteroid\\Apps\\node\\node.exe',
    'C:\\Users\\Auteroid\\Desktop\\debugging-service-typescript\\dist\\launchers\\launch_service.js'
  ]
}
runtime Set debug mode { mode: 0 }
Node.js is only supported on Windows 8.1, Windows Server 2012 R2, or higher.
Setting the NODE_SKIP_PLATFORM_CHECK environment variable to 1 skips this
check, but Node.js might not execute correctly. Any issues encountered on
unsupported platforms will not be fixed.

@hp8wvvvgnj6asjm7
Copy link
Author

i have set platform check to 1 already
Untitled-1

@hp8wvvvgnj6asjm7
Copy link
Author

hp8wvvvgnj6asjm7 commented Oct 7, 2020

It seems that this is the actual problem? But why does it ignore the platform check variable during debug? I can use node js without any problems otherwise. What is the user the debugger runs as?

@connor4312
Copy link
Member

Ok, that explains it. The process we launch to talk back to VS Code is failing to launch, which we should report better.

This can be fixed by having the usages of spawn and spawnSync inherit that variable in here: https://github.com/microsoft/vscode-js-debug/blob/master/src/targets/node/bootloader.ts I would accept a PR for this.

@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues good first issue Issues identified as good for first-time contributors and removed info-needed Issue requires more information from poster labels Oct 7, 2020
@connor4312 connor4312 added this to the Backlog milestone Oct 7, 2020
@connor4312 connor4312 changed the title debugger showing no variables, no matter what config Debugger does not work when running Node.js on an unsupported operating system Oct 7, 2020
@hp8wvvvgnj6asjm7
Copy link
Author

thanks heaps!

@hp8wvvvgnj6asjm7
Copy link
Author

@github-actions
Copy link

Unable to locate closing commit in issue timeline. You can manually reference a commit by commenting \closedWith someCommitSha.

@github-actions github-actions bot removed the author-verification-requested Issues potentially verifiable by issue author label Oct 28, 2020
@connor4312
Copy link
Member

\closedWith ba1b6a7

@connor4312 connor4312 added the author-verification-requested Issues potentially verifiable by issue author label Oct 28, 2020
@github-actions
Copy link

This bug has been fixed in to the latest release of VS Code Insiders!

@hp8wvvvgnj6asjm7, you can help us out by confirming things are working as expected in the latest Insiders release. If things look good, please leave a comment with the text /verified to let us know. If not, please ensure you're on version bb16786 of Insiders (today's or later - you can use Help: About in the command pallete to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@aeschli aeschli added the verification-steps-needed Steps to verify are needed for verification label Oct 29, 2020
@connor4312
Copy link
Member

To verify this you need to:

  1. Use Windows 7
  2. Run Node 14
  3. Set NODE_SKIP_PLATFORM check as a user/global environment variable
  4. Verify you can debug

Or you can verify through code review

@connor4312 connor4312 removed the verification-steps-needed Steps to verify are needed for verification label Nov 2, 2020
@rzhao271 rzhao271 added the verified Verification succeeded label Nov 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues good first issue Issues identified as good for first-time contributors insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@connor4312 @aeschli @rzhao271 @hp8wvvvgnj6asjm7 and others