View Issue Details

IDProjectCategoryView StatusLast Update
0002143XdebugStep Debuggingpublic2023-11-08 09:10
Reporterxdebugger Assigned Toderick  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Target Version3.3dev 
Summary0002143: Suggestions for dbgp Proxy
Description

Xdebug DBGp proxy (0.4.2-dev)

If a client tries to register the same ide key, IP and port again, it should be accepted instead of returning a could not add error. This is because a client can be disconnected for a variety of reasons.

Steps To Reproduce
  1. client sends proxyinit
  2. terminate client without sending de-registering
  3. client sends proxyinit again will fail to register
TagsNo tags attached.
Operating System
PHP Version8.1.10-8.1.19

Activities

derick

2022-12-12 09:30

administrator   ~0006473

That's a pretty good idea. I initially didn't want to do this, because that would also mean that other team mates could take over your IDE key, as they can just repoint it to their IDE. I think I will have to make this an optional flag.

TwoD

2023-11-05 13:45

reporter   ~0006670

I agree with the previous suggestion, it would help with the annoying case of thinking you're all set up to debug a hard to reproduce bug only to find out the connection failed because of this. :)

Another, somewhat related, suggestion would be for the proxy to have a timeout and let execution continue if the registered client does does not respond within that time.
We're often running into a near catch 22 where we've forgotten to disable the little Xdebug helper extension for the browser before navigating away from a site we've been debugging and closing the IDE.
The next time you try to visit the page the cookie gets passed along, Xdebug connects to the proxy, which waits for the IDE, and then nothing more happens. Once you realize it's waiting for a debugger you have to either restart the proxy or start the IDE and unregister your key. The helper extension could be a bit more helpful here of course, as right now you can't stop it from sending along the cookie without actually having visited the site first or unloading it completely.
The IDE could of course also be improved to automatically unregister the client before closing. Having a timeout in the proxy would be very convenient if the other projects can't compensate for this situation.

derick

2023-11-06 16:25

administrator   ~0006671

I have just updated a new version of dbgpProxy (0.5.0), and you can find it at https://xdebug.org/download#dbgpProxy

It has the following changes:

  1. There is a new -f flag. If set, IDEs can register with a key, even if that key has already been registered. It will replace it.
  2. I fixed a bug where the proxy would sit in an unresponsive state for a key, if it could not set up a forwarder as the IDE could not be connected to.
  3. I fixed another bug where the connection would hang when removing a key registration without an actual connection

The 1st point should address the original issue here.

The 2nd point should address "suggestion would be for the proxy to have a timeout and let execution continue if the registered client does does not respond within that time."

TwoD

2023-11-08 09:10

reporter   ~0006674

0.5.0 was just what we needed, it is going to make things much smoother for us, especially when moving between the office and home machines.
I can confirm both the -f flag is working and the site no longer hangs if the xdebug helper was left enabled. I think I may have seen 3 happen earlier, but thought it was an IDE bug. I can not provoke it to happen anymore so that's an added bonus.
Thank you!

Issue History

Date Modified Username Field Change
2022-12-10 17:10 xdebugger New Issue
2022-12-12 09:30 derick Severity minor => feature
2022-12-12 09:30 derick Status new => confirmed
2022-12-12 09:30 derick Note Added: 0006473
2022-12-12 09:31 derick Target Version => 3.2dev
2023-09-04 11:06 derick Target Version 3.2dev => 3.3dev
2023-11-05 13:45 TwoD Note Added: 0006670
2023-11-06 16:25 derick Assigned To => derick
2023-11-06 16:25 derick Status confirmed => closed
2023-11-06 16:25 derick Resolution open => fixed
2023-11-06 16:25 derick Note Added: 0006671
2023-11-08 09:10 TwoD Note Added: 0006674