PhpStorm is not receiving xdebug connections : PhpStorm event log : Cannot evaluate expression 'isset($_SERVER['PHP_IDE_CONFIG'])'

后端 未结 7 1168
时光说笑
时光说笑 2020-12-09 02:28

I configured everything for PhpStorm and xdebug to work, I\'m running Ubuntu 14.04.

the connection back to the IDE is not established, and I get this in the IDE eve

相关标签:
7条回答
  • 2020-12-09 03:13

    I had this problem as well and tried every trick I could find, but nothing worked. For me, debugging works most of the time, but sometimes it just stops working with the message: "Cannot accept external Xdebug connection: Cannot evaluate expression 'isset($_SERVER['PHP_IDE_CONFIG'])'"

    So I eventually realized I had a compilation error in my code (misspelled method name - PhpStorm does not always report these things, at least in my setup). As soon as I corrected the error debugging started working again. Maybe this can help someone struggling.

    Although I still have issues with breakpoints not being hit, I can throw in a "xdebug_break();" line in the code and debugging becomes more reliable. The downside with using xdebug_break instead of breakpoints is (apart from the fact that it's more work than just adding a breakpoint) the local variables not being displayed in the PhpStorm debugger for some reason (only globals are shown). That makes debugging less convenient, but at least I can make it work.

    Apparently you can't have everything :) Coming from the Java world, good debugging is just something I have been able to take for granted, but I have now realized how spoiled I have been :)

    0 讨论(0)
提交回复
热议问题