> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-add-new-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 插件调试

> 本文档介绍如何使用 Dify 的远程调试功能来测试插件。文档详细说明了如何获取调试信息、配置环境变量文件、启动插件远程调试以及验证插件安装状态。通过这种方法，开发者可以在本地开发的同时，在 Dify 环境中实时测试插件。

<Note> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处，请参考[英文原版](/en/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin)。</Note>

完成插件开发后，下一步是测试插件能否正常工作。Dify 提供了便捷的远程调试方法，帮助你在测试环境中快速验证插件功能。

前往["插件管理"](https://cloud.dify.ai/plugins)页面，获取远程服务器地址和调试 Key。

![远程调试插件](https://assets-docs.dify.ai/2024/12/053415ef127f1f4d6dd85dd3ae79626a.png)

返回插件项目，复制 `.env.example` 文件并重命名为 `.env`，然后填入你获取的远程服务器地址和调试 Key 信息。

`.env` 文件：

```bash theme={null}
INSTALL_METHOD=remote
REMOTE_INSTALL_URL=debug.dify.ai:5003
REMOTE_INSTALL_KEY=********-****-****-****-************
```

运行 `python -m main` 命令启动插件。在插件页面，你可以看到插件已安装到工作区，团队的其他成员也可以访问该插件。

![插件已安装到工作区](https://assets-docs.dify.ai/2024/12/ec26e5afc57bbfeb807719638f603807.png)
