Video by via Dailymotion Source Royal commentator Daniela Elser believes Kate has hugely contributed to providing the Royal Family with a new, warmer and familiar image. However, she argued major productions such as the upcoming film Spencer or the fifth season of Netflix’s The Crown may deal a “devastating blow” to the work done by…
Exército de Israel afirma que há brasileiros entre os reféns do Hamas
Video by via Dailymotion Source O Exército de Israel afirmou nesta quarta-feira (11), que há brasileiros entre as pessoas que estão sendo mantidas reféns pelo grupo palestino Hamas na Faixa de Gaza. A informação foi anunciada pelo porta-voz do Exército, Jonathan Conricus. Segundo ele, há também reféns da Argentina, Estados Unidos, França, Alemanha, Itália e…
You Laugh You Lose But Its Actually Funny #SSSniperWolf #uk #usa #us #canada #america #europe…
Video by via Dailymotion Source #SSSniperWolf #uk #usa #us #canada #america #europe #shorts #Mrbeast #181M #America #UnitedKingdom #UnitedState #Spain #Germany #France #Ireland #Poland #Greenland #Iceland #Thailand #Nigeria #Argentina #Egypt #UnitedKingdom #Unitedstates #UK #US #USA #Ireland #Canada #Gareenland #Germany #France #Italy #Hungary #Spain #Austria #Belgium #Netherlands #Denmark #portugal #Greece #poland #Croatia #Finland #Sweden #Bulgaria #Slovenia #Luxembourg…
Join us for the Moodle Academy webinar “What’s New in Moodle 4.3” on Thursday 19th October at 11:00 UTC
We invite you to register to join us for the free Moodle Academy webinar “What’s New in Moodle 4.3” on Thursday 19th October, at 11:00-12:00 UTC.
In this webinar you will learn about the new features of Moodle 4.3 for administrators and teachers.
This webinar is part of the course ‘What’s New in Moodle 4.3′. You have to be enrolled in the course to join the webinar.
DrupalEasy: Debugging all the things with Xdebug, DDEV, PhpStorm, PhpUnit
Over the past few years, we’ve published a couple of blog posts about setting up Xdebug for Drupal module development. But, like all things in tech, there’s always more to learn as tools and technology evolve.
The setup
I was recently working with one of our Professional (Drupal) Module Development students trying to determine why she wasn’t able to use Xdebug to debug a PhpUnit-based functional test. To be clear, the breakpoint wasn’t set in the actual test class, the breakpoint was set in some custom module code that was called by the test class.
In functional tests, Guzzle is used by PhpUnit to make calls like:
$this->drupalGet('')
So, in a way, there isn’t a direct PHP connection between test class and the code under test. It is in this circumstance that the breakpoint wasn’t working.
Xdebug was working fine for this student to debug other aspects of the same project – it just wasn’t hitting breakpoints during functional tests.
The solution
This was one of those instances that I had seen (and solved) previously, but to be honest, PhpStorm/Xdebug solutions have often involved numerous trips into the (extensive) PhpStorm settings area. By the time the problem is fixed, I was never 100% sure exactly which change I made had actually solved the problem. But, this time, I was more careful…
Obviously, Xdebug must be enabled in DDEV, and PhpStorm’s almost-magical auto-configuration for Xdebug needs to have configured a new “Server” with proper path mappings (especially for the project root).
The PhpStorm configuration settings related to Xdebug that I now recommend are:
- Set the “Max connections” value to 20 in the “PHP | Debug” configuration area (see image above).
- Uncheck the “Force break at the first line when no path mapping is specified,” “Force break at first line when a script is outside the project” and “Ignore external connections through unregistered server configurations” checkboxes in the “PHP | Debug” configuration area (see image above.)
- Set “Host” and “Name” in the “PHP | Servers” configuration are the same (and of the form name.ddev.site, where name is your site’s DDEV machine name) (see image below.)
- When running functional tests, PhpStorm may request to see up a new server connection in “PHP | Servers” with the name “localhost.” Allow it and ensure the path mapping is correct.
With these settings, functional PhpUnit tests can be effectively debugged.