shyim / shopware-docker

Easy to use Docker Installation for Shopware 5 and Shopware 6
MIT License
115 stars 27 forks source link

XDebug not working on SW5 projects #161

Closed rvveber closed 2 years ago

rvveber commented 2 years ago

When using a SW5 Project and enabling XDEBUG as followed in the Wiki We can only see "File not found." in the frontend.

shyim commented 2 years ago

But you replaced the 6 in the image name with 5 right?

🤔

rvveber commented 2 years ago

lmao, i did indeed not see this 6. Corrected it, xdebug gets loaded, but to configure, the php.ini isn't loaded In project root, right?

shyim commented 2 years ago

It should be auto configured. whats your environment? yes with a php.ini file in root you can configure it

rvveber commented 2 years ago

I'm on vscode, i imagine i need to configure the xdebug.idekey to match my IDE. but dunno, i have never really worked with xdebug before, this is my php.ini

zend_extension=xdebug.so

xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.discover_client_host=true
xdebug.remote_cookie_expire_time=3600
xdebug.remote_enable=on
xdebug.remote_autostart=on
xdebug.remote_connect_back=on
xdebug.remote_host=project.dev.localhost
xdebug.remote_port=9000
xdebug.idekey=VSCODE

All i know is that, those values are not beeing applied when i output phpinfo()

vscodes xdebug launch.json

{"version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9000,
            "pathMappings": {
                "/var/www/html/project": "${workspaceFolder}"
            }
        }
    ]}
rvveber commented 2 years ago

Oh and i'm on arch linux btw. No WSL hacks relevant

shyim commented 2 years ago

I never used vscode for xdebug always phpstorm. have no idea sorry 🙈

rvveber commented 2 years ago

Okay NVM, xdebug works, php.ini DOES get applied, just xdebug options don't, because apparently you don't put xdebug options into a php.ini file?

Not sure, but i imagine you could work around that with including a xdebug configuration file location via php.ini.

Thank you for the help!