Add helper function for xdebugging in phpunit
Merge upstream changes