0
votes

For some reason I cannot get Xdebug to work in PhpStorm for a local (on my Mac) TYPO3 9.5 site. It's setup with Composer and the site resides on /Users/myusername/Sites/mysite

Xdebug is installed and on another local https://fun.test with a single test index.php file it works fine.

I have the ports correct, created a 'Run/Debug' configuration as PHP Web Page, start url https://mysite.test. On the server(mysite.test 443) of that config, I included (also tried not to) the path mappings. I also set the symlinks from the vendor bin map in the absolute paths. But whatever I try I keep getting

Debug session was finished without being paused It may be caused by path mappings misconfiguration or not synchronized local and remote projects.

I watched the videos, but they are examples of an older TYPO3 version and also without https and don't work for me.

Any hints how to get it working?

UPDATED with parts of error log

-> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///Users/myuser/Sites/mysite/var/cache/code/cache_core/ext_localconf_f91d966404f45802fa2d2f505b0b6efa59cfb322.php" lineno="884" type="Notice"><![CDATA[Undefined index: adminpanel_requestcache]]></xdebug:message></notify>

-> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///Users/myuser/Sites/mysite/public/typo3/sysext/core/Classes/MetaTag/AbstractMetaTagManager.php" lineno="299" type="Notice"><![CDATA[Undefined index: allowedSubProperties]]></xdebug:message></notify>

-> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///Users/myuser/Sites/mysite/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php" lineno="3913" type="Notice"><![CDATA[Undefined index: makeInstanceService]]></xdebug:message></notify>
2
Show your PHP | Servers config then. Maybe some stuff is missing. But I would suggest to delete any entry there and try zero-debug approach, where IDE will help with the creation of such entry for you. - LazyOne
I updated with error log, and said above what is in the server config. Auto creation of the server gives me the same problem. - Jacco van der Post
Maybe it tries to execute cache file .. and it's excluded in IDE? I'm not familiar with TYPO3 and how the project shoudl be setup for it -- just general PHP debugging experience. - LazyOne

2 Answers

0
votes

It's working now. In the PHP Web Page 'Run/Debug Configurations', server configuration I set the symlinks from the vendor bin map in the absolute paths and entered the absolute path for all main 'Project files' folders (which were not different, but after that it worked).

0
votes

In my experience, the above error message is usually due to

  • Not synchronized project. If you created a remote project, you PhpStorm keeps a local copy of the files (typically in ~/PhpstormProjects/). Make sure the files you are debugging are synchronized (right-click on root: Deployment: download from)
  • Incorrect path mapping

That's kind of what the error message says, but intuitively I always underestimated the possible synchronization problem.

To narrow down the problem (just in case your breakpoints are just not being hit):

  • Select "Run: Break at first line in PHP scripts" to check what happens