So it turns out it's pretty easy: replace the "port" and "host" attributes with "connect", so if your configuration was:

{
      "type": "python",
      "request": "attach",
      "name": "attach remote",
      "host": "192.168.1.101",
      "port": 8765,
      "pathMappings": [
        {
          "localRoot": "${workspaceFolder}/...",
          "remoteRoot": "/usr/app/..."
        }
      ],
      "justMyCode": false
    },

It becomes:

{
      "type": "debugpy",
      "request": "attach",
      "name": "attach remote",
      "connect": { "host": "192.168.1.101", "port": 8765 },
      "pathMappings": [
        {
          "localRoot": "${workspaceFolder}/...",
          "remoteRoot": "/usr/app/..."
        }
      ],
      "justMyCode": false
    },
Answer from PeterKogan on Stack Overflow
🌐
PyPI
pypi.org › project › debugpy
debugpy · PyPI
Python :: 3.14 · Topic · Software Development :: Debuggers · Report project as malware · debugpy is an implementation of the Debug Adapter Protocol for Python. The source code and the issue tracker is hosted on GitHub.
      » pip install debugpy
    
Published   Jan 29, 2026
Version   1.8.20
🌐
GitHub
github.com › microsoft › debugpy
GitHub - microsoft/debugpy: An implementation of the Debug Adapter Protocol for Python · GitHub
An implementation of the Debug Adapter Protocol for Python - microsoft/debugpy
Starred by 2.4K users
Forked by 191 users
Languages   Python 92.8% | Cython 2.9% | Shell 1.8% | C++ 1.5% | Roff 0.8% | Perl 0.1%
🌐
Visual Studio Code
code.visualstudio.com › docs › python › debugging
Python debugging in VS Code
November 3, 2021 - In the terminal, install the debugpy package. In the terminal, start Python with the script, for example, python3 myscript.py.
🌐
Microsoft Learn
learn.microsoft.com › en-us › visualstudio › python › debugging-python-code-on-remote-linux-machines
Debug Python code on remote Linux computers - Visual Studio (Windows) | Microsoft Learn
December 11, 2025 - Visual Studio can launch and debug Python applications locally and remotely on a Windows computer. Visual Studio also supports debugging remotely on a different operating system, device, or Python implementation other than CPython by using the debugpy library.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Python Debugger - Visual Studio Marketplace
Extension for Visual Studio Code - Python Debugger extension using debugpy.
Find elsewhere
🌐
Amit Chaudhary
amitness.com › notes › debugpy
How to use debugpy in VSCode
April 2, 2025 - python -m debugpy --listen 0.0.0.0:5678 --wait-for-client \ -m uvicorn main:app --host 0.0.0.0 --port 8000
🌐
NI
ni.com › docs › en-US › bundle › teststand › page › debug-python-modules.html
Debugging Python Modules - NI
Before you can step into Python modules, you must install the following software and configure the Python Adapter: Install the debugpy package in Python.
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 5580830 › how-to-fix-vs-code-debug-failure-for-python
How to fix VS code debug failure for python - Microsoft Q&A
October 9, 2025 - > e:; cd 'e:\work\python\scripts\renamer'; & 'C:\Program Files\Python311\python.exe' 'c:\Users\dcleland\.vscode\extensions\ms-python.debugpy-2025.14.1-win32-x64\bundled\libs\debugpy\launcher' '36805' '--' 'E:\work\python\scripts\renamer\renamer.py' Traceback (most recent call last): File ...
🌐
Qodo
qodo.ai › blog › learn › tutorial: how to debug python code in visual studio code
Tutorial: How to Debug Python code in Visual Studio Code - Qodo
September 17, 2025 - { "name": "Flask App Debug", "type": "debugpy", "request": "launch", "program": "${workspaceFolder}/app.py", "env": { "FLASK_ENV": "development", "PORT": "5000" } } VS Code’s debugger automatically uses your selected Python interpreter, but you can override this in launch.json if needed.
🌐
Pantsbuild
pantsbuild.org › subsystems › debugpy
debugpy | Pantsbuild
An implementation of the Debug Adapter Protocol for Python (https://github.com/microsoft/debugpy).
🌐
Python.org
discuss.python.org › python help
Debugging python file with python from main - Python Help - Discussions on Python.org
September 9, 2025 - Hi, i am trying to work on a [CPython issue]( [Windows] Python 3.13 New REPL prompt swallows characters with print(..., end=" ") · Issue #128067 · python/cpython · GitHub ) and for that trying to debug/step through the [repl code]( https://github.com/python/cpython/blob/main/Lib/\_pyrep...
🌐
GitHub
github.com › microsoft › debugpy › wiki › Ramping-up-on-debugpy
Ramping up on debugpy
An implementation of the Debug Adapter Protocol for Python - microsoft/debugpy
Author   microsoft
🌐
PyPI
pypi.org › project › debugpy-run
debugpy-run · PyPI
If you have the VS Code Python extension installed then the full debugpy debugger is already bundled with it. You open a terminal window and run this utility to invoke your program with arguments. The utility finds the path where debugpy is installed and then runs it for the program and arguments ...
      » pip install debugpy-run
    
Published   Nov 06, 2025
Version   1.16
🌐
Nvidia
docs.omniverse.nvidia.com › kit › docs › omni.kit.debug.python › 0.2.3 › debugpy.html
debugpy — Omniverse Kit 0.2.3 documentation
November 7, 2024 - omni.kit.debug.python · If a client is connected to the debug adapter that is debugging
🌐
GitHub
github.com › microsoft › debugpy › issues › 1726
debugpy not supporting Python 3.7 and failing with import ...
November 10, 2024 - This extension is supported for all actively supported versions of the Python language (i.e., Python >= 3.7). Earlier version of debugpy like - v2024.10.0 are working as expected.
Author   DikshaMakkar
🌐
OpenEmbedded
layers.openembedded.org › layerindex › recipe › 332218
OpenEmbedded Layer Index - python3-debugpy
master · meta-jupyter · python3-debugpy · python3-debugpy 1.5.1 · Sources · Patches · Other branches · This recipe in other branches of meta-jupyter: · change history • about this site • FAQ