I would like to debug/trace acceptance tests (breakpoint, step etc.) in VSCodeI'm using PHP Debug extension and I'm able to debug common PHP scripts creating HTML pages.But I'm not able to get it working for acceptance tests using WebDriver. Any thoughts how to do it ?
Do you want to debug application code or test code?How do you run Codeception?
I want to debug acceptance tests only, not application. I'm running tests using codecept run acceptance TestCest. Actualy I'm still playing with tests and trying what form would be best for me. Running of Selenium tests in Cest format seems promising.
codecept run acceptance TestCest
I do it this way:1. create ini file containing all xdebug settings and most importantly xdebug.remote_autostart = on2. run php with that ini file - php -c xdebug.ini /full/path/to/codecept run acceptance
xdebug.remote_autostart = on
php -c xdebug.ini /full/path/to/codecept run acceptance
Great, it's working, thank you very much.
This is my xdebug.ini: xdebug.remote_enable=1 xdebug.remote_autostart=on
I've just found out that it's possible to add the xdebug lines into client's php.ini (/etc/php/7.0/cli/php.ini on my Ubuntu) and then I can run tests using the same command in debugging mode as in non-debugging mode, i.e. codeception run acceptance TestCest
codeception run acceptance TestCest