Skip to content

Python Debugger not attaching in V2025.14.0/V2025.14.1 and Breaking Debugging FunctionalityΒ #837

@tulis-deshaw

Description

@tulis-deshaw

Description

The recent updates to the Python Debugger extension (ms-python.debugpy) from V2025.10.0 to V2025.14.0 and subsequently to V2025.14.1 are causing debugging issues for Python applications. The issue appears to be related to changes in the debugger attaching logic.

Environment Information

  • Python Debugger extension versions tested:
    • V2025.10.0 (working)
    • V2025.14.0 (broken)
    • V2025.14.1 (broken)
  • VSCode:
Version: 1.103.2 (system setup)
Commit: 6f17636121051a53c88d3e605c491d22af2ba755
Date: 2025-08-20T16:45:34.255Z
Electron: 37.2.3
ElectronBuildId: 12035395
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Windows_NT x64 10.0.22631
  • I use VSCode on my Windows machine, and ssh into a Linux host for development.

Error Details

When attempting to debug Python code, the following error occurs:

Output Tab:

2025-10-15 17:48:30.694 [info] Debugging using the editor button 'Debug in terminal'
2025-10-15 17:48:30.704 [info] Getting configurations for workspace
2025-10-15 17:48:30.706 [warning] Missing field in launch.json: version
2025-10-15 17:48:30.706 [info] Using configuration in launch.json
2025-10-15 17:48:31.627 [info] Using the only workspaceFolder found:  /codemill/tulis/test_pycharm
2025-10-15 17:48:31.640 [info] Resolving launch configuration with substituted variables
2025-10-15 17:48:31.640 [info] Using the only workspaceFolder found:  /codemill/tulis/test_pycharm
2025-10-15 17:48:31.776 [info] DAP Server launched with command: /usr/local/bin/python3 /u/tulis/.vscode-server/extensions/ms-python.debugpy-2025.14.0-linux-x64/bundled/libs/debugpy/adapter
2025-10-15 17:48:34.223 [info] Received 'debugpySockets' event from debugpy.
2025-10-15 17:48:34.229 [info] Received 'debugpySockets' event from debugpy.
2025-10-15 17:48:34.234 [info] Received 'debugpySockets' event from debugpy.

Terminal Error:

%  /usr/bin/env /usr/local/bin/python3 /u/tulis/.vscode-server/extensions/ms-python.debugpy-2025.14.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 35469 -- /codemill/tulis/test_pycharm/src/python/maths/test_add.py 
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/u/tulis/.vscode-server/extensions/ms-python.debugpy-2025.14.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/__main__.py", line 92, in <module>
    main()
  File "/u/tulis/.vscode-server/extensions/ms-python.debugpy-2025.14.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/__main__.py", line 44, in main
    host = sockets.get_default_localhost()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'debugpy.common.sockets' has no attribute 'get_default_localhost'

launch.json:

{
    "configurations": [
        {
            "name": "Python Debugger: Current File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
        }
    ]
}

After a few seconds we get this error popup:

Image

Can someone help me here to fix this?

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions