You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
venv/PyCharm 2025.2.1.1/plugins/python-ce/helpers/pydev/pydevd_plugins/extensions
王梁辉 e3c6c39059
初始化项目:添加 src(源代码)和 doc(文档)文件夹
5 months ago
..
types 初始化项目:添加 src(源代码)和 doc(文档)文件夹 5 months ago
README.md 初始化项目:添加 src(源代码)和 doc(文档)文件夹 5 months ago
__init__.py 初始化项目:添加 src(源代码)和 doc(文档)文件夹 5 months ago

README.md

Extensions allow extending the debugger without modifying the debugger code. This is implemented with explicit namespace packages.

To implement your own extension ...

  1. Ensure that the root folder of your extension is in sys.path (add it to PYTHONPATH)
  2. Ensure that your module follows the directory structure below
  3. The __init__.py files inside the pydevd_plugin and extension folder must contain the preamble below, and nothing else
  4. Your plugin name inside the extensions folder must start with pydevd_plugin
  5. 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

Preamble

import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)

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