You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since simpletest is meant for testing/development, it would be helpful if it fully supported debugging.
As things are now, if you want to debug what happens inside the drupalPost/drupalGet requests in Simpletest [debug in the sense of "step through the code in a debugger", such as xdebug or Zend], you have to do something like what is described on the bottom of this page: http://drupal.org/node/30011
Namely, you either need to set up a separate Apache virtual server and use that, or you need to hack drupalPost/drupalGet to add something like this near the top to add the debugging session information to the URL before it is passed through curl:
I used xdebug all the time with SimpleTests without any special work. But I think ddev might be doing something to make that easier. Checking out the php.ini settings it adds, it sets xdebug.start_with_request=yes, which means xdebug runs on every request. If set to xdebug.start_with_request=trigger, then XDEBUG_SESSION_START is used to start xdebug on a conditional basis. But I think this is all only feasible with ddev because it makes it so easy to turn on/off xdebug:
ddev xdebug on
...run my debugger requests...
ddev xdebug off
It looks like xdebug.start_with_request=trigger is the default when xdebug is in debug mode.
This is to crossport https://www.drupal.org/node/889338 which was backported from D8 to D7 core back in 2015:
PS: noting that there is this D8 -> D7 backport follow-up in d.o: Make the Simpletest XDebug integration work for CLI requests. If we take too long to review/test this, perhaps keep an eye on that other issue and include it here.
The text was updated successfully, but these errors were encountered: