Did you add a breakpoint?
debugpy.breakpoint()
import debugpy
# 5678 is the default attach port in the VS Code debug configurations. Unless a host and port are specified, host defaults to 127.0.0.1
debugpy.listen(5678)
print("Waiting for debugger attach")
debugpy.wait_for_client()
debugpy.breakpoint() #must have
print('break on this line')
Ref: https://code.visualstudio.com/docs/python/debugging
Answer from Tiana987642 on Stack OverflowPyPI
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
Repository https://github.com/microsoft/debugpy
Homepage https://aka.ms/debugpy
GitHub
github.com › microsoft › debugpy
GitHub - microsoft/debugpy: An implementation of the Debug Adapter Protocol for Python · GitHub
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%
Videos
05:40
Learn How To Debug Your Python Container In Minutes! - YouTube
11:36
Debugging Python with Visual Studio Code (VSCode) - YouTube
08:00
Debug Python inside Docker using debugpy and VSCode - YouTube
r/neovim on Reddit: "Error while finding module specification for ...
08:58
Learn to Debug Python in VSCode (Say Goodbye to Print Statements) ...
Visual Studio Marketplace
marketplace.visualstudio.com › items
Python Debugger - Visual Studio Marketplace
Extension for Visual Studio Code - Python Debugger extension using debugpy.
debugpy
debugpy.com
Home - debugpy
Debugpy is a powerful and lightweight debugging tool designed to simplify the Python development process. It enables developers to easily inspect code, set breakpoints, analyze variables, and troubleshoot issues in real time.
Top answer 1 of 2
1
Did you add a breakpoint?
debugpy.breakpoint()
import debugpy
# 5678 is the default attach port in the VS Code debug configurations. Unless a host and port are specified, host defaults to 127.0.0.1
debugpy.listen(5678)
print("Waiting for debugger attach")
debugpy.wait_for_client()
debugpy.breakpoint() #must have
print('break on this line')
Ref: https://code.visualstudio.com/docs/python/debugging
2 of 2
-1
You can put a breakpoint in the Python source file before attach to the debugpy server, then it will hit and break back into VSCode after attach.
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
Arch Linux
archlinux.org › packages › extra › x86_64 › python-debugpy
Arch Linux - python-debugpy 1.8.18-1 (x86_64)
python-debugpy 1.8.18-2 [extra-staging] (x86_64) gcc-libs · glibc · python ·
NI
ni.com › docs › en-US › bundle › teststand › page › debug-python-modules.html
Debugging Python Modules
Modular Data Acquisition · Distributed Measurement and Control
Anaconda.org
anaconda.org › conda-forge › debugpy
debugpy - conda-forge
January 29, 2026 - Organization created on Apr 11, 2015 · A community-led collection of recipes, build infrastructure, and distributions for the conda package manager
piwheels
piwheels.org › project › debugpy
piwheels - debugpy
February 11, 2026 - The piwheels project page for debugpy: An implementation of the Debug Adapter Protocol for Python
SageMath
doc.sagemath.org › html › en › reference › spkg › debugpy.html
debugpy: Implementation of the Debug Adapter Protocol for Python - Packages and Features
Implementation of the Debug Adapter Protocol for Python · https://pypi.org/project/debugpy/
GitHub
github.com › microsoft › vscode-python-debugger
GitHub - microsoft/vscode-python-debugger: Python debugger (debugpy) extension for VS Code. · GitHub
A Visual Studio Code extension that supports Python debugging with debugpy. Python Debugger provides a seamless debugging experience by allowing you to set breakpoints, step through code, inspect variables, and perform other essential debugging ...
Starred by 166 users
Forked by 95 users
Languages TypeScript 97.8% | Python 1.9%
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.