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

debugpy.listen() doesn't return endpoint if "in_process_debug_adapter=True" is passed #1656

Open
wombatzus opened this issue Aug 22, 2024 · 0 comments
Labels
needs repro Issue has not been reproduced yet

Comments

@wombatzus
Copy link

Before creating a new issue, please check the FAQ to see if your question is answered there.

Environment data

  • debugpy version: 1.8.5
  • OS and version: Linux 6.8.0-40-generic #40~22.04.3-Ubuntu
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.19
  • Using VS Code or Visual Studio: VS Code

Actual behavior

Calling debugpy.listen(0, in_process_debug_adapter=True) returns None.

Expected behavior

The API reference says debugpy.listen should return a (host, port) tuple, and indeed it does do that when calling debugpy.listen(0) or debugpy.listen(0, in_process_debug_adapter=False).

Makes it a little inconvenient when passing 0 as the port since I have no way to know what port is actually being listened on.

Steps to reproduce:

import debugpy
try:
  host, port = debugpy.listen(5678, in_process_debug_adapter=True)
  print(host, port)
except Exception as e:
  print(f"Exception: {type(e)}: {e}")

Outputs: "Exception: <class 'TypeError'>: cannot unpack non-iterable NoneType object"

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Aug 22, 2024
@judej judej assigned debonte and unassigned KacieKK and debonte Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants