Title: Bug: Debug Attach stopped working in 2025.18.0 · Issue #904 · microsoft/vscode-python-debugger · GitHub
Open Graph Title: Bug: Debug Attach stopped working in 2025.18.0 · Issue #904 · microsoft/vscode-python-debugger
X Title: Bug: Debug Attach stopped working in 2025.18.0 · Issue #904 · microsoft/vscode-python-debugger
Description: Debug attach mode stopped working in 2025.18.0. When I downgrade to 2025.16.0, it works again. Reproducer: Launch configuration: { "name": "Python Debugger: Attach using Process Id", "type": "debugpy", "request": "attach", "processId": "...
Open Graph Description: Debug attach mode stopped working in 2025.18.0. When I downgrade to 2025.16.0, it works again. Reproducer: Launch configuration: { "name": "Python Debugger: Attach using Process Id", "type": "debug...
X Description: Debug attach mode stopped working in 2025.18.0. When I downgrade to 2025.16.0, it works again. Reproducer: Launch configuration: { "name": "Python Debugger: Attach using Process Id&q...
Opengraph URL: https://github.com/microsoft/vscode-python-debugger/issues/904
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: Debug Attach stopped working in 2025.18.0","articleBody":"Debug attach mode stopped working in 2025.18.0. When I downgrade to 2025.16.0, it works again.\n\nReproducer:\n\nLaunch configuration:\n\n```json\n{\n \"name\": \"Python Debugger: Attach using Process Id\",\n \"type\": \"debugpy\",\n \"request\": \"attach\",\n \"processId\": \"${command:pickProcess}\"\n}\n```\n\nIn my SLES 15-SP4 (Linux) machine:\n\n```shell\n\u003e python3\nPython 3.12.0 (main, Oct 18 2023, 17:19:09) [GCC 7.5.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\nCtrl click to launch VS Code Native REPL\n\u003e\u003e\u003e import os\n\u003e\u003e\u003e os.getpid()\n\u003cpid of python process will be shown\u003e\n```\n\nStart the debugging with the launch configuration from above and use the pid from the `os.getpid()`. Then observe that it will just try to attach for a minute, then give up with the following error:\n\n\u003cimg width=\"440\" height=\"152\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9a2ec95c-6d78-4c4e-bcf4-ef402e7e3116\" /\u003e\n\nThis is the content in the debug console:\n\n```\nAttach to PID failed.\n\n--- Starting attach to pid: 141427 ---\n0.00s - Debugger warning: It seems that frozen modules are being used, which may\n0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off\n0.00s - to python to disable frozen modules.\n0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library \"/lib64/libthread_db.so.1\".\n0x00007fa0655600a6 in select () from /lib64/libc.so.6\nThe target architecture is set to \"auto\" (currently \"i386:x86-64\").\n$1 = (void *) 0x0\nNo symbol \"DoAttach\" in current context.\n[Inferior 1 (process 141427) detached]\nE+00000.426: Code injection into PID=141427 failed:\n \n Traceback (most recent call last):\n File \"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/adapter/../../debugpy/../debugpy/server/cli.py\", line 468, in attach_to_pid\n add_code_to_python_process.run_python_code(\n File \"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py\", line 483, in run_python_code_linux\n subprocess.check_call(\" \".join(cmd), shell=True, env=env)\n File \"/usr/itm/python/3.12.0/lib/python3.12/subprocess.py\", line 413, in check_call\n raise CalledProcessError(retcode, cmd)\n subprocess.CalledProcessError: Command 'gdb --nw --nh --nx --pid 141427 --batch --eval-command='set scheduler-locking off' --eval-command='set architecture auto' --eval-command='call (void*)dlopen(\"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_linux_amd64.so\", 2)' --eval-command='sharedlibrary attach_linux_amd64' --eval-command='call (int)DoAttach(0, \"import codecs;import json;import sys;decode = lambda s: codecs.utf_8_decode(bytearray(s))[0] if s is not None else None;script_dir = decode([47, 100, 105, 115, 107, 50, 47, 116, 115, 111, 110, 111, 110, 111, 47, 46, 118, 115, 99, 111, 100, 101, 45, 115, 101, 114, 118, 101, 114, 47, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 47, 109, 115, 45, 112, 121, 116, 104, 111, 110, 46, 100, 101, 98, 117, 103, 112, 121, 45, 50, 48, 50, 53, 46, 49, 56, 46, 48, 47, 98, 117, 110, 100, 108, 101, 100, 47, 108, 105, 98, 115, 47, 100, 101, 98, 117, 103, 112, 121, 47, 97, 100, 97, 112, 116, 101, 114, 47, 46, 46, 47, 46, 46, 47, 100, 101, 98, 117, 103, 112, 121, 47, 46, 46, 47, 100, 101, 98, 117, 103, 112, 121, 47, 115, 101, 114, 118, 101, 114]);setup = json.loads(decode([123, 34, 109, 111, 100, 101, 34, 58, 32, 34, 99, 111, 110, 110, 101, 99, 116, 34, 44, 32, 34, 97, 100, 100, 114, 101, 115, 115, 34, 58, 32, 91, 34, 49, 50, 55, 46, 48, 46, 48, 46, 49, 34, 44, 32, 52, 52, 52, 56, 57, 93, 44, 32, 34, 119, 97, 105, 116, 95, 102, 111, 114, 95, 99, 108, 105, 101, 110, 116, 34, 58, 32, 102, 97, 108, 115, 101, 44, 32, 34, 108, 111, 103, 95, 116, 111, 34, 58, 32, 110, 117, 108, 108, 44, 32, 34, 97, 100, 97, 112, 116, 101, 114, 95, 97, 99, 99, 101, 115, 115, 95, 116, 111, 107, 101, 110, 34, 58, 32, 34, 97, 53, 101, 51, 51, 100, 52, 53, 50, 48, 56, 50, 51, 48, 49, 54, 53, 54, 48, 55, 57, 52, 52, 48, 57, 54, 57, 98, 48, 51, 52, 52, 102, 99, 99, 50, 56, 97, 54, 98, 57, 53, 55, 49, 55, 50, 50, 99, 54, 97, 99, 100, 48, 53, 48, 49, 54, 102, 102, 50, 99, 54, 102, 102, 34, 125]));sys.path.insert(0, script_dir);import attach_pid_injected;del sys.path[0];attach_pid_injected.attach(setup);\", 0)'' returned non-zero exit status 1.\n \n Stack where logged:\n File \"\u003cfrozen runpy\u003e\", line 198, in _run_module_as_main\n File \"\u003cfrozen runpy\u003e\", line 88, in _run_code\n File \"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/adapter/../../debugpy/__main__.py\", line 71, in \u003cmodule\u003e\n cli.main()\n File \"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/adapter/../../debugpy/../debugpy/server/cli.py\", line 508, in main\n run()\n File \"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/adapter/../../debugpy/../debugpy/server/cli.py\", line 475, in attach_to_pid\n log.reraise_exception(\"Code injection into PID={0} failed:\", pid)\n File \"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/adapter/../../debugpy/../debugpy/common/log.py\", line 222, in reraise_exception\n _exception(format_string, *args, **kwargs)\n \n\nTraceback (most recent call last):\n File \"\u003cfrozen runpy\u003e\", line 198, in _run_module_as_main\n File \"\u003cfrozen runpy\u003e\", line 88, in _run_code\n File \"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/adapter/../../debugpy/__main__.py\", line 71, in \u003cmodule\u003e\n cli.main()\n File \"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/adapter/../../debugpy/../debugpy/server/cli.py\", line 508, in main\n run()\n File \"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/adapter/../../debugpy/../debugpy/server/cli.py\", line 475, in attach_to_pid\n log.reraise_exception(\"Code injection into PID={0} failed:\", pid)\n File \"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/adapter/../../debugpy/../debugpy/server/cli.py\", line 468, in attach_to_pid\n add_code_to_python_process.run_python_code(\n File \"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py\", line 483, in run_python_code_linux\n subprocess.check_call(\" \".join(cmd), shell=True, env=env)\n File \"/usr/itm/python/3.12.0/lib/python3.12/subprocess.py\", line 413, in check_call\n raise CalledProcessError(retcode, cmd)\nsubprocess.CalledProcessError: Command 'gdb --nw --nh --nx --pid 141427 --batch --eval-command='set scheduler-locking off' --eval-command='set architecture auto' --eval-command='call (void*)dlopen(\"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_linux_amd64.so\", 2)' --eval-command='sharedlibrary attach_linux_amd64' --eval-command='call (int)DoAttach(0, \"import codecs;import json;import sys;decode = lambda s: codecs.utf_8_decode(bytearray(s))[0] if s is not None else None;script_dir = decode([47, 100, 105, 115, 107, 50, 47, 116, 115, 111, 110, 111, 110, 111, 47, 46, 118, 115, 99, 111, 100, 101, 45, 115, 101, 114, 118, 101, 114, 47, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 47, 109, 115, 45, 112, 121, 116, 104, 111, 110, 46, 100, 101, 98, 117, 103, 112, 121, 45, 50, 48, 50, 53, 46, 49, 56, 46, 48, 47, 98, 117, 110, 100, 108, 101, 100, 47, 108, 105, 98, 115, 47, 100, 101, 98, 117, 103, 112, 121, 47, 97, 100, 97, 112, 116, 101, 114, 47, 46, 46, 47, 46, 46, 47, 100, 101, 98, 117, 103, 112, 121, 47, 46, 46, 47, 100, 101, 98, 117, 103, 112, 121, 47, 115, 101, 114, 118, 101, 114]);setup = json.loads(decode([123, 34, 109, 111, 100, 101, 34, 58, 32, 34, 99, 111, 110, 110, 101, 99, 116, 34, 44, 32, 34, 97, 100, 100, 114, 101, 115, 115, 34, 58, 32, 91, 34, 49, 50, 55, 46, 48, 46, 48, 46, 49, 34, 44, 32, 52, 52, 52, 56, 57, 93, 44, 32, 34, 119, 97, 105, 116, 95, 102, 111, 114, 95, 99, 108, 105, 101, 110, 116, 34, 58, 32, 102, 97, 108, 115, 101, 44, 32, 34, 108, 111, 103, 95, 116, 111, 34, 58, 32, 110, 117, 108, 108, 44, 32, 34, 97, 100, 97, 112, 116, 101, 114, 95, 97, 99, 99, 101, 115, 115, 95, 116, 111, 107, 101, 110, 34, 58, 32, 34, 97, 53, 101, 51, 51, 100, 52, 53, 50, 48, 56, 50, 51, 48, 49, 54, 53, 54, 48, 55, 57, 52, 52, 48, 57, 54, 57, 98, 48, 51, 52, 52, 102, 99, 99, 50, 56, 97, 54, 98, 57, 53, 55, 49, 55, 50, 50, 99, 54, 97, 99, 100, 48, 53, 48, 49, 54, 102, 102, 50, 99, 54, 102, 102, 34, 125]));sys.path.insert(0, script_dir);import attach_pid_injected;del sys.path[0];attach_pid_injected.attach(setup);\", 0)'' returned non-zero exit status 1.\nPYDEVD_GDB_SCAN_SHARED_LIBRARIES not set (scanning all libraries for needed symbols).\nRunning: gdb --nw --nh --nx --pid 141427 --batch --eval-command='set scheduler-locking off' --eval-command='set architecture auto' --eval-command='call (void*)dlopen(\"/disk2/tsonono/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_linux_amd64.so\", 2)' --eval-command='sharedlibrary attach_linux_amd64' --eval-command='call (int)DoAttach(0, \"import codecs;import json;import sys;decode = lambda s: codecs.utf_8_decode(bytearray(s))[0] if s is not None else None;script_dir = decode([47, 100, 105, 115, 107, 50, 47, 116, 115, 111, 110, 111, 110, 111, 47, 46, 118, 115, 99, 111, 100, 101, 45, 115, 101, 114, 118, 101, 114, 47, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 47, 109, 115, 45, 112, 121, 116, 104, 111, 110, 46, 100, 101, 98, 117, 103, 112, 121, 45, 50, 48, 50, 53, 46, 49, 56, 46, 48, 47, 98, 117, 110, 100, 108, 101, 100, 47, 108, 105, 98, 115, 47, 100, 101, 98, 117, 103, 112, 121, 47, 97, 100, 97, 112, 116, 101, 114, 47, 46, 46, 47, 46, 46, 47, 100, 101, 98, 117, 103, 112, 121, 47, 46, 46, 47, 100, 101, 98, 117, 103, 112, 121, 47, 115, 101, 114, 118, 101, 114]);setup = json.loads(decode([123, 34, 109, 111, 100, 101, 34, 58, 32, 34, 99, 111, 110, 110, 101, 99, 116, 34, 44, 32, 34, 97, 100, 100, 114, 101, 115, 115, 34, 58, 32, 91, 34, 49, 50, 55, 46, 48, 46, 48, 46, 49, 34, 44, 32, 52, 52, 52, 56, 57, 93, 44, 32, 34, 119, 97, 105, 116, 95, 102, 111, 114, 95, 99, 108, 105, 101, 110, 116, 34, 58, 32, 102, 97, 108, 115, 101, 44, 32, 34, 108, 111, 103, 95, 116, 111, 34, 58, 32, 110, 117, 108, 108, 44, 32, 34, 97, 100, 97, 112, 116, 101, 114, 95, 97, 99, 99, 101, 115, 115, 95, 116, 111, 107, 101, 110, 34, 58, 32, 34, 97, 53, 101, 51, 51, 100, 52, 53, 50, 48, 56, 50, 51, 48, 49, 54, 53, 54, 48, 55, 57, 52, 52, 48, 57, 54, 57, 98, 48, 51, 52, 52, 102, 99, 99, 50, 56, 97, 54, 98, 57, 53, 55, 49, 55, 50, 50, 99, 54, 97, 99, 100, 48, 53, 48, 49, 54, 102, 102, 50, 99, 54, 102, 102, 34, 125]));sys.path.insert(0, script_dir);import attach_pid_injected;del sys.path[0];attach_pid_injected.attach(setup);\", 0)'\n```\n\nThe gdb version on my host if 14.2, if that's of any relevance, as the debugger is seemingly using the host's gdb based on the output in the debug console.","author":{"url":"https://github.com/TSonono","@type":"Person","name":"TSonono"},"datePublished":"2025-12-17T12:58:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/904/vscode-python-debugger/issues/904"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c864d78f-f0ea-0146-e731-61ab27806fc3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1FE:3B35E8:23F440F:3106639:69808CB8 |
| html-safe-nonce | 33a32aa10359b5177c7764d8eaefb62e7d9d5b41dcef9972ff4153617e2dcc27 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUZFOjNCMzVFODoyM0Y0NDBGOjMxMDY2Mzk6Njk4MDhDQjgiLCJ2aXNpdG9yX2lkIjoiMzM2OTIwMTM1NjQwODY1NTAzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7cec08e79b5e4bfecb12890ef871bc50e2ea5e46d214dfd6392ca485a7bc4a73 |
| hovercard-subject-tag | issue:3738804213 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/vscode-python-debugger/904/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7f15a4c1d08611ec0410008e1f6961e86afe01e9017c805527ba80d4dbc9801c/microsoft/vscode-python-debugger/issues/904 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7f15a4c1d08611ec0410008e1f6961e86afe01e9017c805527ba80d4dbc9801c/microsoft/vscode-python-debugger/issues/904 |
| og:image:alt | Debug attach mode stopped working in 2025.18.0. When I downgrade to 2025.16.0, it works again. Reproducer: Launch configuration: { "name": "Python Debugger: Attach using Process Id", "type": "debug... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TSonono |
| hostname | github.com |
| expected-hostname | github.com |
| None | 469777838102ab297ec4fcad28d2f2800ba15f98fafe1027761c30ba1171be52 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/vscode-python-debugger git https://github.com/microsoft/vscode-python-debugger.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 615045081 |
| octolytics-dimension-repository_nwo | microsoft/vscode-python-debugger |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 615045081 |
| octolytics-dimension-repository_network_root_nwo | microsoft/vscode-python-debugger |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | abd13d780acc53a8d052b86a5b6ac82b79676965 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width