-
Notifications
You must be signed in to change notification settings - Fork 158
DEBUGPY_ADAPTER_ENDPOINTS being invalid should output an error #1866
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
Comments
I've also updated by environment to debugpy version 1.8.13 but the issue is still there. If there was any way to pass arguments to the adapter, I could see the error messages from the adapter itself. |
Further investigating the issue: it seems that the adapter does start when it's initiated from code instead of calling debugpy from the command-line. |
Here's some more info. The issue seems to happen only when I start the process I want to debug from the integrated terminal. When I logon to the remote linux server from a simple command-line terminal, the debug adapter starts properly and binds to the tcp port. This is how my environment looks like when using stand-alone ssh (clutter and IP addresses removed:
And this is the environment when working with the intergrated terminal:
|
Could it be something to do with the new feature in vscode that detects if a program is started up in debug mode and automatically attaches to it? |
Try unsetting this: DEBUGPY_ADAPTER_ENDPOINTS It looks like it's pointing to an old installation that no longer exists. |
Yep, that solves it. I think the adapter should revert to the old behavior when a tcp port is explicitly defined as a command-line argument. Or at least provide some sort of error message. |
I'm sorry but I don't think it's completed. There should be an error message displayed when the adapter can't be launched or connected to the current vscode instance. |
Hmm, it's weird that there's no error message. It should have output one. This code here: debugpy/src/debugpy/adapter/__main__.py Line 115 in e01e6dd
Creating an invalid DEBUGPY_ADAPTER_ENDPOINTS doesn't seem to output an error for me either. |
Could it be that stderr gets lost somewhere around where debugpy launches the adapter? I could turn on verbose errors for debugpy but there is no option to pass any parameters to the adapter, even though it has the --log-stderr option. I actually modified the code to turn on logging in the adapter but I didn't see any error in the terminal. |
Not sure. If you want to try debugging and submitting a fix, please feel free to do so. I believe the DEBUGPY_ADAPTER_ENDPOINTS was set by an older ms-python-debugpy extension and it's not being cleaned up, so it's likely more people are going to run into this. |
@karthiknadig is this possibly related to the no-config debugging in the terminal? |
Please try the latest version of the debugger extension, that we shipped today ( |
Using version 2025.4.1 is not a fix for me. Reverting to version 2025.0.1 for now. |
Before creating a new issue, please check the FAQ to see if your question is answered there.
Environment data
Actual behavior
I'm starting debugby from the command line using
The adapter appears to be started and it reports the port number 5799 but when I want to connect to the port I get ECONNREFUSED in vscode. If I check with
netstat
the port is not open. If I list the running processes the debugpy adapter is not among them so my guess is that it fails right after opening the port.When I run the above command with sudo, the adapter is started up correctly and the port can be accessed, the adapter process is listed by
ps
Expected behavior
Adapter start up properly in user mode
Steps to reproduce:
I'm no aware of any way to reproduce the error outside my server. I've disample SELinux to make sure ports can be opened by user mode processes to no avail. This is an issue that started happening a few days ago and I'm not aware of any system updates.
The text was updated successfully, but these errors were encountered: