xdebug breakpoints not working in web requests from BrowserTestBase

Created on 8 February 2017, almost 8 years ago
Updated 13 June 2023, over 1 year ago

Problem/Motivation

There are varying reports of xdebug breakpoints not stopping in web requests made from BrowserTestBase tests (eg, code executed via drupalGet, etc).

I am able to reproduce this locally running the latest 8.4.x, with PhpStorm xdebug connections set to 10, and xdebug.remote_autostart=1. Normal debugging works just fine (including stepping into WebTestBase web requests).

This is purportedly due to those tests utilizing PHPUnit's "run in separate process" functionality, which causes the code to be serialized php that is executed, and thus preventing IDEs from having appropriate code mappings.

There is a PR for PHPUnit to write these out to files so IDEs can do the appropriate mappings.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
PHPUnit 

Last updated about 3 hours ago

Created by

🇺🇸United States jhedstrom Portland, OR

Live updates comments and jobs are added and updated live.
  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇷🇸Serbia super_romeo Belgrade

    Any news?
    There is no way to debug tests.

  • 🇮🇳India sukr_s

    Taking from commercial #3, in ./vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php change runTestsInSeparateProcesses to false and debugging works.

  • 🇦🇺Australia acbramley

    This should be a support request, it definitely works if things are set up correctly :)

  • Status changed to Closed: works as designed 3 months ago
  • 🇳🇿New Zealand quietone

    I agree with #34, there is no evidence that this is a bug in core. The conversation here slowed significantly 6 years ago so I think it is time to close this Support Request. I'll add to that there are a few Functional tests in core where debugging is not working as expected for me. For those, I will seek help in another place.

    The Drupal Core issue queue is not the ideal place for support requests (that option is mostly there for filing support issues for contributed modules and themes). There are several support options listed on our support page (Community > Support at the top of Drupal.org) and there is Drupal Slack . Drupal Slack and the Forums, which are our two main support mechanisms in the Drupal community.

Production build 0.71.5 2024