No pydevd protocol specification

二次信任 提交于 2019-12-22 09:59:40

问题


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.

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

All what I have found are:

  • 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

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


回答1:


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.



来源:https://stackoverflow.com/questions/41169047/no-pydevd-protocol-specification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!