Install & Compatibility
Where this runs
tested against v3.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.466s · 37.1MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.3s · import 0.426s · 36MB
36MB installed
● package 36MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
settrace
✓ import pydevd
pydevd.settrace(host='<IDE_HOST>', port=<IDE_PORT>)
✗ import pydevd_pycharm.settrace() for generic remote debugging
While `pydevd_pycharm` exists for PyCharm specific integrations, `pydevd.settrace` is the standard for general remote debugging with `pydevd`.
This quickstart demonstrates how to initiate remote debugging. Run this script, then start your IDE's remote debug server (e.g., 'Python Debug Server' in PyCharm or 'Attach' configuration in VSCode with PyDev for VSCode extension). The script will pause at `settrace` (if `suspend=True`) or continue until a breakpoint is hit. Ensure `PYDEVD_REMOTE_HOST` and `PYDEVD_REMOTE_PORT` environment variables match your IDE's debug server configuration.
import pydevd
import os
# Configure host and port for your IDE's debug server
# The host should be the IP address or hostname where your IDE is running.
# The port should match the port configured in your IDE's debug server.
# For local debugging, 'localhost' or '127.0.0.1' is common.
# Ensure these environment variables are set in your execution environment
# or replace with literal values for quick testing.
IDE_HOST = os.environ.get('PYDEVD_REMOTE_HOST', '127.0.0.1')
IDE_PORT = int(os.environ.get('PYDEVD_REMOTE_PORT', '5678')) # Common default port
print(f"Connecting PyDev.Debugger to {IDE_HOST}:{IDE_PORT}...")
try:
# This line connects the Python process to the remote debugger server.
# Execution will pause here until the IDE connects.
pydevd.settrace(host=IDE_HOST, port=IDE_PORT, suspend=False, stdoutToServer=True, stderrToServer=True)
print("Debugger connected. You can now set breakpoints in your IDE.")
except Exception as e:
print(f"Could not connect to debugger: {e}")
def main():
message = "Hello, remote debugging!"
print(message)
# Place a breakpoint here in your IDE after connecting
result = "Debugging complete."
print(result)
if __name__ == '__main__':
main()
pydevd --version
Debug
Known issues
breakingPyDev.Debugger versions are often tied to specific Python versions. Latest 3.x versions (e.g., 3.5.0) require Python 3.8 and onwards. For Python 3.3 to 3.7, use `pydevd==2.10.0`. For Python 2, use `pydevd==2.8.0`. Installing an incompatible version can lead to runtime errors.fixEnsure the installed `pydevd` version matches your Python interpreter's compatibility requirements. Check the official documentation or PyPI for the correct version mapping.
affects: < 3.8.0 for Python 3.3-3.7; all 3.x for Python 2
gotchaIt is generally not recommended to install `pydevd` separately if you are using an IDE (like PyDev for Eclipse, PyCharm, or VSCode Python with `debugpy`) that already bundles or manages its debugger backend. Manual installation is primarily for remote debugging scenarios where the target machine does not have the IDE's bundled helper files, and can lead to version conflicts or unexpected behavior if mismatched with the IDE's internal debugger version.fixOnly `pip install pydevd` for explicit remote debugging setups. For IDE-managed debugging, rely on the IDE's built-in debugger or follow its specific instructions for remote debugging (e.g., `pydevd-pycharm` for PyCharm).
affects: All versions
deprecatedSome parameters to `pydevd.settrace()` (or `pydevd_pycharm.settrace()`) like `stdoutToServer` or `stderrToServer` have undergone renaming in newer versions to be more 'Pythonic'. Using older parameter names with a newer `pydevd` version can result in errors.fixRefer to the latest `pydevd` documentation or IDE-specific instructions for the most current `settrace` parameter names and usage. Update your `settrace` calls accordingly.
affects: Potentially 3.x, exact versions vary.
breakingThe standalone `pydevd` library (fabioz/PyDev.Debugger) and the `pydevd` version vendored within Microsoft's `debugpy` (used by VSCode Python and Visual Studio Python) have diverged significantly since `debugpy` version 1.8.1. This means that installing a recent standalone `pydevd` might not be compatible with `debugpy`'s expectations, potentially breaking debugging functionality for VSCode/Visual Studio users.fixFor VSCode/Visual Studio, rely on the `debugpy` extension to provide the debugger. If remote debugging requires a standalone `pydevd`, ensure its version is compatible with the `debugpy` version you are using, or consider alternative remote debugging configurations provided by your IDE.
affects: debugpy 1.8.1 and newer when using standalone pydevd
Upgrade
Version history
3.5.0latest on PyPI · released Apr 2, 2026
Audit
Dependencies
No dependency data recorded yet.