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

Attach to Node Process not working with PowerShell on Windows 10 #46704

Closed
tsalinger opened this issue Mar 27, 2018 · 4 comments
Closed

Attach to Node Process not working with PowerShell on Windows 10 #46704

tsalinger opened this issue Mar 27, 2018 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) verified Verification succeeded

Comments

@tsalinger
Copy link
Contributor

tsalinger commented Mar 27, 2018

Testing #46582

Windows 10, NodeJS: v8.9.4

  1. Create a simple script like:
setInterval(() => {
    console.log('a');
}, 500)
  1. Launch the script in PowerShell: node --inspect=1500 foo.js
  2. Use the 'Attach to Node Process' command or use the following launch.json:
    // 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": "attach",
        "name": "Attach to Process via pid or port",
        "processId": "${command:PickProcess}"
    }
    ]
}

Expected: Picker shows my process
Actual: Picker shows "There are no entries to pick from"

Note that it works with fine with cmd. This is a Powershell specific issue.

@tsalinger tsalinger added the bug Issue identified by VS Code Team member as probable bug label Mar 27, 2018
@weinand
Copy link
Contributor

weinand commented Mar 27, 2018

problem is: PowerShell launches programs with a full path whereas command prompt uses a relative path:

PowerShell:
2018-03-27_16-48-36

Command.exe:
2018-03-27_16-50-21

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Mar 27, 2018
@weinand weinand added this to the March 2018 milestone Mar 27, 2018
@weinand
Copy link
Contributor

weinand commented Mar 27, 2018

No, the analysis from above is wrong. I'm handling the full path correctly.

The issue is in fact another duplicate of #46672

@weinand weinand closed this as completed Mar 27, 2018
@weinand weinand removed this from the March 2018 milestone Mar 27, 2018
@weinand weinand added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 27, 2018
@tsalinger
Copy link
Contributor Author

Tested on latest insiders and works fine.

@tsalinger tsalinger added the verified Verification succeeded label Mar 29, 2018
@weinand
Copy link
Contributor

weinand commented Mar 29, 2018

@tsalinger thanks!

Till confirmed (and showed me) that both the "Attach Process Picker" and the "Auto Attach" work for him on Windows.

@sbatten @RMacfarlane so for some (in ZRH) it seems to work on Windows. What is difference in Redmond?

@vscodebot vscodebot bot locked and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants