cwsoft Posted November 17, 2024 Share Posted November 17, 2024 (edited) @kongondoCool to know. So far used ddev exclusively from the bash shell, as I worked several years on Unix systems. However, I may check out this VS code Add-in with one of the next projects. Edited November 17, 2024 by cwsoft Link to comment Share on other sites More sharing options...
dotnetic Posted November 17, 2024 Share Posted November 17, 2024 10 hours ago, nurkka said: does anybody use PHPStorm within WSL2 and could share some insights I use it with great speed (not using Mutagen, as it is not needed in WSL2). I also work with VScode (with WSL plugin from Microsoft) and it also works great. 1 Link to comment Share on other sites More sharing options...
cst989 Posted November 22, 2024 Share Posted November 22, 2024 One thing I've found is that most environments will show php warnings when using $config->debug = true but ddev will not. Does anyone worry/do anything about this? Link to comment Share on other sites More sharing options...
zoeck Posted November 22, 2024 Share Posted November 22, 2024 You can create a custom PHP Configuration: https://ddev.readthedocs.io/en/stable/users/extend/customization-extendibility/#custom-php-configuration-phpini You can test something like this: File - .ddev/php/my-php.ini [PHP] display_errors = On; error_reporting = E_ALL; 4 Link to comment Share on other sites More sharing options...
kongondo Posted November 22, 2024 Share Posted November 22, 2024 7 hours ago, cst989 said: One thing I've found is that most environments will show php warnings when using $config->debug = true but ddev will not. Does anyone worry/do anything about this? This hasn't been my experience. DDEV shows both warnings and fatal errors. I haven't had to do anything special. What's your environment? 1 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted December 19, 2024 Share Posted December 19, 2024 On 11/6/2024 at 9:41 PM, kongondo said: Anyone got xdebug + WSL2 + DDEV + VScode working please? I have read the tut in the DDEV docs but it is not working for me. In VSCode the Xdebug session starts. On the website Xdebug doesn't kick in. After a while, VSCode breakpoints turn transparent and hovering over them says 'invalid breakpoint' or something like that. I did attempt all the WSL-related troubleshooting in the DDEV docs, e.g. the telnet connection. Was hoping for a question here. After a while VSCode says port 9003 closed. Sometimes I see notifications from ProcessWire (e.g. headers already sent) in the debug output. I am not sure whether and how to append the port number 9003 to the ddev url. E.g. mysite.ddev.site:9003. If I do this, the website hangs (chrome website cannot be reached). Any ideas? Thanks! Good day, @kongondo! Have you managed to get it to work? P.S. I have managed to make it work both for web and cli. The only thing that I still cannot figure out is how to launch a specific php file (see an example without ddev below). Still can't find out how to start it not with php but with ddev exec php. { "name": "Launch test.php", "type": "php", "request": "launch", "program": "${workspaceFolder}/test.php", "cwd": "${workspaceFolder}", "port": 0, "runtimeArgs": [ "-dxdebug.start_with_request=yes" ], "env": { "XDEBUG_MODE": "debug,develop", "XDEBUG_CONFIG": "client_port=${port}" } } I have tries adding "runtimeExecutable": "ddev exec php", but it didn't work for some reason: Error: spawn ddev exec php ENOENT at ChildProcess._handle.onexit (node:internal/child_process:285:19) at onErrorNT (node:internal/child_process:483:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -2, code: 'ENOENT', syscall: 'spawn ddev exec php', path: 'ddev exec php', spawnargs: [ '-dxdebug.start_with_request=yes', '...', '...' ] } Link to comment Share on other sites More sharing options...
bernhard Posted December 21, 2024 Author Share Posted December 21, 2024 Have you ever realised that DDEV only works when you are connected to the internet? No? Then all fine 😉 If you did, I have good news for you! DDEV does NOT require a working internet connection! You can, of course, use it for local development without being online - for example on a plane. The only thing you need to know is that if you started the project via "ddev start" while being connected to the internet and then you go offline, then your browser will not find your project any more. All you have to do to solve that is to run a "ddev restart" 🙂 The reason for this is explained here: https://ddev.com/blog/ddev-name-resolution-wildcards/ @gebeer 2 Link to comment Share on other sites More sharing options...
Recommended Posts