Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug features in Behat 3 with echo

I am trying to debug a feature in Behat 3 to see what is going on.

Echo statements don't seem to work - I get no output.

The step I'm trying to use currently looks like this:

/**
 * @Then /^echo last request$/
 */

public function echoLastRequest() 
{
    echo ($this->_history->getLastRequest());
    echo 'test';
}
like image 788
Adamski Avatar asked Aug 20 '14 09:08

Adamski


1 Answers

You could use a simple print_r() or var_export():

var_export('DEBUG!!!');

Debug preview

like image 162
Rafal Enden Avatar answered Oct 14 '22 22:10

Rafal Enden