Skip to content

Implement support for DBGp Proxy servers - #237

Closed
staticglobal wants to merge 1 commit into
vim-vdebug:masterfrom
staticglobal:master
Closed

Implement support for DBGp Proxy servers#237
staticglobal wants to merge 1 commit into
vim-vdebug:masterfrom
staticglobal:master

Conversation

@staticglobal

Copy link
Copy Markdown

As documented here:
https://xdebug.org/docs-dbgp.php#just-in-time-debugging-and-debugger-proxies

Defines two new config parameters:

  • proxy_host (default '')
  • proxy_port (default 9001)

If both options are non-empty, the Connection class does a few new things at the beginning and end of our session.

New workflow when using a proxy is:

  • VIM listens for debugger connections on local IP and port X (default=9000) like always
  • VIM makes a connection to the proxy server on port Y (default=9001)
  • VIM sends a "proxyinit" command, which includes ide_key and the port we are listening on (X)
  • Proxy registers our IP/port with our ide_key and sends an XML response
  • VIM processes the XML response and disconnects
  • VIM starts the usual 20s wait for debugger connection
  • debuggers are all hard-coded to connect to the proxy for debugging sessions
  • If a debugger connection comes into the proxy (before the VIM timeout) with our ide_key, the proxy will connect back to us on port X and copy all data back and forth between VIM and debugger. This connection is indistinguishable from a regular debugger connection (except originating from the proxy IP instead of the remote host IP).
  • When we are done, VIM makes another connection to proxy port Y and sends a "proxystop" command to un-map our ide_key

@BlackIkeEagle BlackIkeEagle added this to the Version 2.0.0 milestone Jun 24, 2016
@riedel

riedel commented Feb 17, 2018

Copy link
Copy Markdown

Just wanted to comment that I have used this pull-request successfully.

@BlackIkeEagle BlackIkeEagle removed this from the Version 2.0.0 milestone Mar 1, 2018
@BlackIkeEagle

Copy link
Copy Markdown
Member

Due to the big changes within vdebug I can't quickly tranform this to v2 compatible code, so I'll move it to 2.1

@staticglobal

Copy link
Copy Markdown
Author

Superceded by #511

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants