<table><tr><td style="">wcancino added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D18122">View Revision</a></tr></table><br /><div><div><p>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</p>

<p><a href="http://nikosams.blogspot.com/2010/02/kdevelop-xdebug-php-debugger.html" class="remarkup-link" target="_blank" rel="noreferrer">http://nikosams.blogspot.com/2010/02/kdevelop-xdebug-php-debugger.html</a> (section 2)</p>

<p>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</p>

<p>very well.  The way kdevelop debugger infrastructure manages the states make that when a debug session passes to 'NotStartedState' the 'DebugLaunch/Continue'</p>

<p>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</p>

<p>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</p>

<p>to "listen" for future incoming scripts, so session is still alive and passed to NotStartedState. Doing so, the aforementioned Debug Launch button activates</p>

<p>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</p>

<p>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 )</p>

<p>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</p>

<p>intention of that aforementioned 'Debug launch'.</p>

<p>Moreover, I do not see the tests cases so broken, I will try to find time to fix the multiple connection test.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R68 KDevelop XDebug Support</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D18122">https://phabricator.kde.org/D18122</a></div></div><br /><div><strong>To: </strong>wcancino, brauch, pprkut<br /><strong>Cc: </strong>pprkut, kdevelop-devel, glebaccon, hase, antismap, iodelay, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>