We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Debugging with Xdebug

Hi all,

I'm using Netbeans and trying to debug Phalcon project using Xdebug debugger. But when in step-by-step mode I pass any of Phalcon classes, then after 1-2 seconds debugger stop working with message "Socket Exception occured". That doesn't happens with pure PHP projects. Also have same problem on PhpStorm, but there dubugging just stops without any message. It seems to me that there is some kind of problems between Phalcon and Xdebug extensions.

Any one have an idia how to fix that?

My environment:

  • PHP: 7.3 (also tried: 7.2)
  • Netbeans: 11.0 or PhpStorm 2019.2
  • Xdebug: 2.7.2 (also tried: 2.8)
  • OS: Windows 10
  • Phalcon: 3.4.4 (also tried: 3.2.x)

Small script for testing:

$test = 5;
$config = new \Phalcon\Config(['test' => 45]); // <--- After that line debugger stop working
$yyy = $config->get('test');

Didn't have ever any issue really with xdebug and phalcon on xdebug, maybe try to create docker image to reproduce it?


I have something similar. Please refer to the following.


I intend to present all the information to prepare the environment, but is it not enough that no one responds?

create docker image to reproduce it?

I don't understand well with rough instructions because I have little experience. I want you to show me what I should do.


Actually after checking apache error log I found following error:

[mpm_winnt:notice] [pid 11116:tid 720] AH00428: Parent: child process 10172 exited with status 3221225477 -- Restarting.

Then checked windows event viewer and found that whole apache process crashed due to Xdebug

Faulting application name: httpd.exe, version:, time stamp: 0x5cee4f90
Faulting module name: php_xdebug.dll, version:, time stamp: 0x5d39da6b
Exception code: 0xc0000005
Fault offset: 0x000000000002a59e
Faulting process id: 0x27bc
Faulting application start time: 0x01d55a810f670989
Faulting application path: C:\xampp\apache\bin\httpd.exe
Faulting module path: C:\xampp\php\ext\php_xdebug.dll
Report Id: 6d3d0f47-e119-4f9d-b1fb-2c3c96cd4753
Faulting package full name: 
Faulting package-relative application ID: 

Thus I guess it's some kind of error in Xdebug. Bug reported on Xdebug issue tracker.


Xdebug has been updated to 2.8.0 and it no longer becomes a segmentation fault in my environment. Please update Xdebug and check again.


No, unfortunatelly it still crash in my environment :(


That's a shame...

As I rebuilt the environment, the Phalcon version was slightly higher than before. It may be working for that, but there is no explanation that it has been updated.

Sorry for letting you expect.