D18122: Fix Xdebug disconnecting after php finished if multiple connections are allowed

waldo cancino noreply at phabricator.kde.org
Mon Jan 14 09:15:24 GMT 2019


wcancino added a comment.


  Well, it is true that this plugins dates from the Kdev4 days, and it is unmaintained. Anyways, with these patch, I correct the plugin to behave as described on
  
  http://nikosams.blogspot.com/2010/02/kdevelop-xdebug-php-debugger.html (section 2)
  
  It is also correct some crashes, due to the fact (in my opinion) that this plugins treat to map the "connection" state to the "session state" and it doesn't map
  
  very well.  The way kdevelop debugger infrastructure manages the states make that when a debug session passes to 'NotStartedState' the 'DebugLaunch/Continue'
  
  button (in 'Debug Launch' mode) is clickable and it immediately invokes to the run method. In the Xdebug case, a connection is active while a program is running but when the
  
  script stops, the connection stopped as well. At this moment, it is logical the debug session ends at the same time, but Xdebug plugin allows to continue
  
  to "listen" for future incoming scripts, so session is still alive and passed to NotStartedState. Doing so, the aforementioned Debug Launch button activates
  
  and if it is pressed invokes to the 'run' method, but there is no script to debug ( nor connection ) and that causes troubles. This patch avoids  it, and as well
  
  fixes some corner cases, where  if the launch of the debugger fails, it ended properly the session (otherwhise,  session remains alive in 'notstartedstate' and  debug launch button activates )
  
  I try another debugger (python and c++) and in both cases, I was not able to see the 'Debug launch' button active (just 'Continue'), that let me curious about the
  
  intention of that aforementioned 'Debug launch'.
  
  Moreover, I do not see the tests cases so broken, I will try to find time to fix the multiple connection test.

REPOSITORY
  R68 KDevelop XDebug Support

REVISION DETAIL
  https://phabricator.kde.org/D18122

To: wcancino, brauch, pprkut
Cc: pprkut, kdevelop-devel, glebaccon, hase, antismap, iodelay, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190114/94d9cd66/attachment.html>


More information about the KDevelop-devel mailing list