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

launch debug connection refused when localhost is not 127.0.0.1 #11325

Closed
zhongpan opened this issue Apr 22, 2020 · 3 comments
Closed

launch debug connection refused when localhost is not 127.0.0.1 #11325

zhongpan opened this issue Apr 22, 2020 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@zhongpan
Copy link

Environment data

  • VS Code version: 1.44.2
  • Extension version (available under the Extensions sidebar): 2020.4.74986
  • OS and version: centos7
  • Python version (& distribution if applicable, e.g. Anaconda): 2.7.5

Expected behaviour

launch debug Current File success

Actual behaviour

launch debug Current File connection refused

Steps to reproduce:

Modify the localhost in /etc/hosts that is not 127.0.0.1, such as eth0 ip.Then launch debug.

My analysis and suggestions

Because localhost in /etc/hosts file is not 127.0.0.1,
Therefore, DebugAdapter is not listening on the address 127.0.0.1,
Therefore, "ptvsd --client --host localhost" cannot connect to DebugAdapter.
It is recommended that the DebugAdapter listen at 0.0.0.0.

@zhongpan zhongpan added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Apr 22, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Apr 22, 2020
@int19h
Copy link

int19h commented Apr 22, 2020

It sounds like you're using ptvsd 4.x for the debugger. Can you please try with debugpy? Take a look at microsoft/ptvsd#2104 to see the various possible reasons why it's not enabled for you - most likely it's because of telemetry opt-out.

@zhongpan
Copy link
Author

It sounds like you're using ptvsd 4.x for the debugger. Can you please try with debugpy? Take a look at microsoft/ptvsd#2104 to see the various possible reasons why it's not enabled for you - most likely it's because of telemetry opt-out.

Yes, I'm using ptvsd. As you suggested, it works when I switch to debugpy.

@int19h
Copy link

int19h commented Apr 23, 2020

Thank you for the confirmation! We're going with debugpy exclusively going forward, so all the fixes happen in there.

@int19h int19h closed this as completed Apr 23, 2020
@ghost ghost removed the triage label Apr 23, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
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
Projects
None yet
Development

No branches or pull requests

3 participants