Files
dify-docs/plugin-dev-zh/0411-remote-debug-a-plugin.mdx
2025-06-19 16:56:33 +08:00

43 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
dimensions:
type:
primary: reference
detail: core
level: beginner
standard_title: Remote Debug a Plugin
language: zh
title: 插件调试
description: 本文档介绍了如何使用Dify的远程调试功能来测试插件。详细说明了获取调试信息、配置环境变量文件、启动插件远程调试以及验证插件安装状态的完整流程。通过这种方式开发者可以在本地开发的同时在Dify环境中实时测试插件。
---
插件开发完成后接下来需要测试插件是否可以正常运行。Dify 提供便捷的远程调试方式,帮助你快速在测试环境中验证插件功能。
前往[“插件管理”](https://cloud.dify.ai/plugins)页获取远程服务器地址和调试 Key。
![远程调试插件](https://assets-docs.dify.ai/2025/04/2779338a43687f3e00155baccdd6d06c.png)
回到插件项目,拷贝 `.env.example` 文件并重命名为 `.env`,将获取的远程服务器地址和调试 Key 等信息填入其中。
`.env` 文件:
```bash
INSTALL_METHOD=remote
REMOTE_INSTALL_URL=debug.dify.ai:5003
REMOTE_INSTALL_KEY=********-****-****-****-************
```
运行 `python -m main` 命令启动插件。在插件页即可看到该插件已被安装至 Workspace 内,团队中的其他成员也可以访问该插件。
![插件安装到 Workspace](https://assets-docs.dify.ai/2024/12/ec26e5afc57bbfeb807719638f603807.png)
{/*
Contributing Section
DO NOT edit this section!
It will be automatically generated by the script.
*/}
---
[编辑此页面](https://github.com/langgenius/dify-docs/edit/main/plugin-dev-zh/0411-remote-debug-a-plugin.mdx) | [提交问题](https://github.com/langgenius/dify-docs/issues/new?title=文档问题%3A%20remote-debug-a-plu&body=%23%23%20问题描述%0A%3C%21--%20请简要描述您发现的问题%20--%3E%0A%0A%23%23%20页面链接%0Ahttps%3A%2F%2Fgithub.com%2Flanggenius%2Fdify-docs%2Fblob%2Fmain%2Fplugin-dev-zh%2F0411-remote-debug-a-plugin.mdx%0A%0A%23%23%20建议修改%0A%3C%21--%20如果有具体的修改建议请在此说明%20--%3E%0A%0A%3C%21--%20感谢您对文档质量的关注%20--%3E)