Debugging

Debugging within the Functional Testing Framework is helpful in identifying test bugs by allowing you to pause execution so that you may:

This is straightforward to do once you create a basic Debug Configuration.

Prerequisites

Creating Debug Configuration with PhpStorm

  1. If not already installed, download the Codeception Framework plugin for PhpStorm (PhpStorm->Preferences->Plugins).
  2. Click Edit Configurations on the configuration dropdown.
  3. Click + and select Codeception from the available types.
  4. Change Test Scope to Type and select functional from the Type: dropdown.
  5. Find the Custom Working Directory option and set the path to your dev/tests/acceptance/ directory.

If you get a warning Path to Codeception for local machine is not configured.:

  1. Click Fix, then +, and select Codeception Local.
  2. Click ... and locate /vendor/bin/codecept in your Adobe Commerce or Magento Open Source installation folder.

The easiest method of tagging a test for debugging is the following:

Your Debug Configuration should now be able to run your test and pause execution on any breakpoints you have set in the generated .php file under the _generated folder.