View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002044||Xdebug||Uncategorized||public||2021-11-09 14:32||2022-02-22 19:31|
|Summary||0002044: every PHP request gives 4x "time-out connecting to client" in xdebug log|
every PHP request results in the following in xdebug.log
 Log opened at 2021-11-09 14:12:20.546902
here is my complete xdebug configuration from php.ini
note that I have log_level=1 to try to suppress this error but it still comes; and commented-out the idekey (from response in 0001953) also did not affect the problem
setting log_level=0 does suppress the errors. is this the expected result ?
|Steps To Reproduce|
execute any PHP script
running a file with only phpinfo(); results in a single instance of the "ERR: time-out connecting..." message, not four instances. but otherwise it's the same.
also note I'm on PHP 8.0.11 but the Mantis PHP-version-selector only goes to 8.0.9
attached is the output from xdebug_info();
|Tags||No tags attached.|
|Operating System||Windows 10 Pro 21H1|
xdebug_info.pdf (422,352 bytes)
There are a few questions / items in your report:
here are the results after changing xdebug.log_level=10, restarting apache, and navigating to the login page of my application
 Log opened at 2021-11-10 15:45:43.237602
yes, I have a shutdown error handler in my index.php script:
no, I have no calls to any xdebug* functions in the PHP code
p.s. there is an XDEBUG_SESSION cookie in my browser, which maybe the cause of xdebug trying to autoconnect. I guess it might have been placed there by previously starting my application in debug mode, from NetBeans?
if I delete the cookie then this is what I see in the log at level=10:
 Log opened at 2021-11-10 16:11:52.698737
short version - it appears to be the cookie.
BUT - if I restart the debugger through NetBeans; then stop it through NB, the cookie gets recreated. Then if I navigate to the site otherwise, it tries to connect.
I'm running NetBeans 12.3 and the PHP Debugger requires a Session-ID, which is used to create a cookie. The debug-config is invalid without it.
So - what do you recommend given these facts?
Yes, that most definitely will do it. It still shouldn't do that four times though.
Yes, I think NetBeans does that.
But that doesn't explain that it checks four times...
Yes, that's how it supposed to work. I'm not sure if NetBeans supports putting the debugger in "listening mode" like PhpStorm and VS Code can, which would allow you to use a browser extension (https://xdebug.org/docs/step_debug#browser-extensions) to decided whether you want to debug a request (or not), and not rely on the Xdebug SESSION cookies at all. From a quick glance at the documentation (https://netbeans.apache.org/kb/docs/php/debugging.html#debuggingSession) it does not.
NetBeans makes assumptions about the required values of the session ID as well. In the documentation it says "Session ID Arbitrary name of the debugging session. By default it is netbeans-xdebug. This value is important to note in cases where you have to set the xdebug.idekey property in php.ini, such as some remote debugging scenarios." — which is nonsense, as Xdebug really doesn't care what it is. Although NetBeans rejects anything with a different value :-/
I'd still like to figure out why it tries it four times. As to the issues with NetBeans, I would probably recommend you switch to VS Code (or PhpStorm), or convince the NetBeans folk to implement a "listen" mode for debugging.
I don't think there is anything to do here on my side. Would you agree?
thanks for following up Derick
turns out NB 12.6 (the current version) has some "debugger Enhancements": https://netbeans.apache.org/download/nb126/#_debugger_enhancements
I'm not sure I know the correct-thing-to-ask. Would you be able to supply language (here) from which I'd create such a request?
is this relevant to what we're discussing ?
|2021-11-09 14:32||JeremyDunn||New Issue|
|2021-11-09 14:32||JeremyDunn||File Added: xdebug_info.pdf|
|2021-11-10 14:56||derick||PHP Version||8.0.5-8.0.9 => 8.0.10-8.0.19|
|2021-11-10 15:18||derick||Assigned To||=> derick|
|2021-11-10 15:18||derick||Status||new => feedback|
|2021-11-10 15:18||derick||Note Added: 0006150|
|2021-11-10 15:52||JeremyDunn||Note Added: 0006155|
|2021-11-10 15:52||JeremyDunn||Status||feedback => assigned|
|2021-11-10 16:20||JeremyDunn||Note Added: 0006156|
|2021-11-24 10:30||derick||Status||assigned => feedback|
|2021-11-24 10:30||derick||Note Added: 0006163|
|2021-11-24 10:30||derick||Note Edited: 0006163|
|2022-02-22 18:10||derick||Note Added: 0006215|
|2022-02-22 19:23||JeremyDunn||Note Added: 0006217|
|2022-02-22 19:23||JeremyDunn||Status||feedback => assigned|
|2022-02-22 19:31||JeremyDunn||Note Added: 0006218|