ec5f52c7c6
Bundles debugpy 1.7.0 directly in python/ so "Maya: Attach (debugpy)" works with no per-machine pip install step. Installed via Maya 2022's own pip so it resolved a version actually compatible with Python 3.7 (Maya 2022's interpreter), then verified import + listen() succeeds under all three target Maya Python versions (3.7/3.9/3.10). Also fixes a latent __file__-under-exec() bug in start_debug_server.py (same pitfall as Maya's own plugin loader, never hit until this exercised it) and corrects the README's Maya Python version claim -- 2022 ships Python 3.7, not 3.9 as previously stated, which was never independently verified until now. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Extensions allow extending the debugger without modifying the debugger code. This is implemented with explicit namespace packages.
To implement your own extension:
- Ensure that the root folder of your extension is in sys.path (add it to PYTHONPATH)
- Ensure that your module follows the directory structure below
- The
__init__.pyfiles inside the pydevd_plugin and extension folder must contain the preamble below, and nothing else. Preamble:
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
- Your plugin name inside the extensions folder must start with
"pydevd_plugin" - Implement one or more of the abstract base classes defined in
_pydevd_bundle.pydevd_extension_api. This can be done by either inheriting from them or registering with the abstract base class.
- Directory structure:
|-- root_directory-> must be on python path
| |-- pydevd_plugins
| | |-- __init__.py -> must contain preamble
| | |-- extensions
| | | |-- __init__.py -> must contain preamble
| | | |-- pydevd_plugin_plugin_name.py