Score:0

I can't debug a functional test for a custom module

id flag

I am trying to debug the functional tests for my custom module.
When I run the debugger, it doesn't hit the breakpoint I've set on the first line of the test method. However, when I debug a functional test from the Node module, it works.

Alfred Armstrong avatar
cn flag
Have you tried using xdebug_break() at your breakpoint? Often helps because it forces a break even if the mapping is not correct (which sounds like a possible reason for this issue)
id flag
This did not work for me.
id flag
The mappings would have to be correct for the Node module to be debugged. PHPStorm uses the parent mapping for its sub directories and files. So as long as my structure matches (it does) then it shouldn't be a mapping issue.
Alfred Armstrong avatar
cn flag
In that case it sounds like your code is not being executed. So that should be the focus of your efforts now, I guess.
id flag
Alright, so if I don't run the debugger and instead just run the test. The test does get executed and comes back as passed with multiple assertions.
Score:0
id flag

Open PHPStorm and go to file > Invalidate Caches...

id flag
I think the question needs a few adjustments if this is the answer.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.