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

Auto attach is not working on Windows #46782

Closed
sbatten opened this issue Mar 27, 2018 · 13 comments
Closed

Auto attach is not working on Windows #46782

sbatten opened this issue Mar 27, 2018 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@sbatten
Copy link
Member

sbatten commented Mar 27, 2018

Testing #46570

On Windows 10, I am unable to see this feature working at all. I have a simple server.js file with a recursive setTimeout and am using Node v8.9.7. I use inspect and inspect-brk with no success. I can however use the UI to attach after launching from the integrated terminal.

@sbatten sbatten added the bug Issue identified by VS Code Team member as probable bug label Mar 27, 2018
@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Mar 28, 2018
@weinand
Copy link
Contributor

weinand commented Mar 28, 2018

If you are using PowerShell then this is most likely a duplicate of #46704

@weinand weinand closed this as completed Mar 28, 2018
@weinand weinand added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 28, 2018
@sbatten
Copy link
Member Author

sbatten commented Mar 28, 2018

@weinand I am unable to auto-attach with cmd or powershell. I can however attach manually with both. I will reopen. Please close if you feel these are the same root cause.

@sbatten sbatten reopened this Mar 28, 2018
@sbatten sbatten removed the *duplicate Issue identified as a duplicate of another issue(s) label Mar 28, 2018
@weinand
Copy link
Contributor

weinand commented Mar 28, 2018

  • What is the commit id of the VS Code build you are using?
  • what are the exact steps?
  • a screencast could help too.

@sbatten
Copy link
Member Author

sbatten commented Mar 28, 2018

Version 1.22.0-insider
Commit 95b0cff
Date 2018-03-28T05:17:37.707Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

In the below image, I have simple server.js file launched in cmd in the integrated terminal with inspect-brk and auto attach on, but we never attach.

image

@weinand
Copy link
Contributor

weinand commented Mar 28, 2018

Cannot reproduce:

2018-03-28_23-34-34

Please try whether a timeout of 1000ms and/or setting a breakpoint makes a difference.

Could you please open the dev tools console and post any error messages here.

And as a last resort: does it work after a reboot?

@weinand weinand closed this as completed Mar 28, 2018
@weinand weinand reopened this Mar 28, 2018
@sbatten
Copy link
Member Author

sbatten commented Mar 28, 2018

still no luck after a full reboot with the changes you suggested. @RMacfarlane also tried and has the same issue as me. We both can successfully attach on Mac so we believe we have the scenario correct.

@weinand
Copy link
Contributor

weinand commented Mar 29, 2018

@sbatten @RMacfarlane This works for us in ZRH. We are not able to reproduce.

@weinand weinand added the *not-reproducible Issue cannot be reproduced by VS Code Team member as described label Mar 29, 2018
@vscodebot vscodebot bot closed this as completed Mar 29, 2018
@weinand weinand reopened this Mar 29, 2018
@microsoft microsoft deleted a comment from vscodebot bot Mar 29, 2018
@weinand
Copy link
Contributor

weinand commented Mar 29, 2018

I'm leaving this open...

@weinand weinand added this to the On Deck milestone Mar 29, 2018
@roblourens
Copy link
Member

Doesn't work for me on Windows either. I'll debug...

@roblourens
Copy link
Member

The regex that parses the wmic output is not matching. The output for me looks like

"C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" "c:\Program Files\Microsoft VS Code Insiders\resources\app\out\bootstrap" --type=extensionHost






                                                                                                                                                              20180329150840.878313-420
 2736             6040

So the problem is that the regex expects a + at -420, which is the time zone! It works if I change the regex. That's a good one...

@roblourens
Copy link
Member

I also noticed that some lines only have empty space for the CommandLine attribute, so the regex doesn't match for those either. Is that expected?

@weinand
Copy link
Contributor

weinand commented Mar 29, 2018

Ha, excellent find! Thanks for you investigation.

afters today's finding that it works in ZRH but not in the US I had a similar speculation (but I had forgotten that I had added the start time to get the sorting right). It would be great if you could add a '-'. Maybe there is even a ' ' if you are in the Greenwich time zone ;-)

If the CommandLine is really empty, then the process is not really interesting for the functionality built into node-debug (there are no --inspect args etc.). For the process viewer it would be a problem because there we are interested in all child processes of VS Code. So, I think we can live with that bug for now.

@roblourens roblourens removed the *not-reproducible Issue cannot be reproduced by VS Code Team member as described label Mar 29, 2018
@roblourens roblourens modified the milestones: On Deck, March 2018 Mar 29, 2018
@roblourens roblourens self-assigned this Mar 29, 2018
@roblourens
Copy link
Member

Fixed, and verified that it writes +000 in the UTC zone

@RMacfarlane RMacfarlane added the verified Verification succeeded label Mar 30, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 14, 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 verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants