没有pydevd协议规范 [英] No pydevd protocol specification

查看:82
本文介绍了没有pydevd协议规范的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一种功能,可以将调试器从PyCharm快速连接到远程Python服务器(我的类似文章,但主题稍有不同)。对于远程调试,PyCharm提供了名为pydevd的库,但是远程服务器必须通过运行中的调试服务器连接到本地计算机。实际上,这并不总是可能的,因为通常本地计算机没有公共地址。

I need a capability to connect the debugger on fly to a remote Python server from PyCharm (my similar post, but slightly different subject). For the remote debugging PyCharm provides the lib called pydevd, but remote server must be connected to local machine with a running debug server. Actually, this isn't always possible because usually local machine has no public address.

因此,作为解决方案,我决定为套接字连接创建代理,它将连接我的具有远程服务器的本地计算机(我已经测试过,代理工作正常)。为了在没有活动调试器的情况下使正在运行的远程服务器成为可能,我的代理服务器必须存储已连接服务器的状态(服务器是否在断点处停止;调试器断开连接后,删除所有断点)并模拟连接/断开消息。

So as a solution, I decide to make proxy for socket connections, which will link my local machine with remote server (I've tested, the proxing works). To make possible the running remote server without active debugger my proxy must store state of connected servers (is the server stopped on breakpoint; remove all breakpoints when debugger has been disconnected) and mock connects/disconnect messages.

主要问题是我找不到pydevd协议的任何规范。

The main problem is that I can't find any specification for pydevd protocol.

我发现的全部是:


  • 握手消息(两条消息代码 501 ,之后是代码为 122 146 的未知消息 101

  • 使用代码 111 设置断点的消息
  • 代码为 112
  • 消息以设置断点
  • 代码为 116的
  • 消息 code>发送标准输出的更改

  • handshake messages (two messages with code 501, after that unknown messages with codes 122 146 101)
  • message with code 111 to set breakpoint
  • message with code 112 to unset breakpoint
  • message with code 116 to send changes of stdout

如果有人遇到相同的问题,请帮助我解决或帮助我可以找到pydevd协议的规范。

If anyone had the same problem, please, help me to solve it or help me to find the specification for pydevd protocol.

推荐答案

pypyd协议没有完整的规范。但是,该实现是开源的,可以在源代码

There is no complete specification for the pydevd protocol. However, the implementation is open-source, and a brief description of the protocol can be found in the source code.

这篇关于没有pydevd协议规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆