0

I have setup Xdebug for some remote debugging, and it works. Sadly it seems to break all of my tests.

This is the config:

xdebug.mode = debug
xdebug.client_port = 10001
xdebug.start_with_request = true
xdebug.idekey = mykey
xdebug.discover_client_host = true

phpstorm

I can connect just fine and step debug... but whenever I try running any PHP command on the CLI (tests for instance) I get this error for every single test (which makes all tests return an error):

Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:10001 (fallback through xdebug.client_host/xdebug.client_port) :-(

I am running this on Ubuntu 20.04

Sinnbeck
  • 617
  • 4
  • 20
  • 56
  • `xdebug.start_with_request = true` -- this is the reason. Configure Xdebug to NOT to attempt to debug every single script See my comments here (https://stackoverflow.com/q/65616198/783119) as well as an answer from Xdebug author. – LazyOne Jan 14 '21 at 13:49
  • OR perhaps you want to debug and it does not work? – LazyOne Jan 14 '21 at 13:49
  • Sadly that stops my debugger from working. I have added an image of my phpstorm config as well. But thanks :) – Sinnbeck Jan 14 '21 at 13:59
  • 1
    So you are debugging a web page .. or what? For a webpage debug -- you should also use Xdebug browser extension [Bookmarkets](https://www.jetbrains.com/phpstorm/marklets/) (both set the Xdebug cookie telling "look, debug me"). I do not have `xdebug.start_with_request` line at all and it works fine this way for me. – LazyOne Jan 14 '21 at 14:11
  • 1
    What about PHP's `error_log` value? Xdebug uses PHP's error logging. The fact that such message is printed in your terminal output suggests that `error_log` is not configured properly (so PHP sends that to your STDOUT so you can see it). make sure to actually check the links in that question. – LazyOne Jan 14 '21 at 14:18
  • Check https://xdebug.org/docs/upgrade_guide - there is no more config item 'idekey' Try using XDEBUG_SESSION=mykey You could also set xdebug.start_with_request to trigger. – Terry Sposato Jan 15 '21 at 04:26

0 Answers0