So there is some issue when the CodeIgniter framework gets run and doesn't debug into the app/Controllers/Home.php file even though the page loads successfully. But if I set a breakpoint in the server/public/index.php I can step through successfully with the debugger. I also tried all of these files as entry points when it auto-detects the paths:Īssuming I use Manually choose local file or project, I set a breakpoint in the server/app/Controllers/Home.php controller (default CodeIgniter index method that returns the welcome message), the breakpoint never gets hit. When I try to map the incoming connection I would prefer to use Import mappings from deployment as it auto-detects the deployment but not sure what the deployment root should be set to: "./files/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d" In the Rules tab, press the button at the bottom left and insert a rule that allows the transit of packets entering the host on the port on which PhpStorm and XDebug are communicating ( 9000 in our case): Thanks for reading. If the plugin is disabled, enable it on the Installed tab of the Settings/Preferences Plugins page, as described in Managing plugins. The Docker plugin is bundled with PhpStorm and activated by default. The plugin is bundled and enabled by default. "/var/run/docker.sock:/tmp/docker.sock:ro" In Linux Mint, open System Settings and select Firewall. PhpStorm provides Docker support using the Docker plugin. 'Compose: docker' has been deployed successfully. I read many tutorial about how to debug remotly but no one was enough good to explain how to configure it with Docker. But now, i need to run this stack remotely on server and still debug from my computer ( MacOs ). "C:\Program Files\Docker\Docker\resources\bin\docker-compose.exe" -f D:\Projects\my-project\devops\docker\docker-compose.yml up -d proxy database opp_web xdebug.remoteautostart1 xdebug.remoteconnectback0 xdebug.idekeyPHPSTORM .localhost. I was able to successfully create and run a docker deployment in PhpStorm: Deploying 'Compose: docker'. How do you map an incoming xdebug connection when your directory structure is split between a public folder which is the entry point for CodeIgniter and the rest of the CodeIgniter framework code in the server folder? It looks like this: I get an incoming connection dialog but not sure how to map it properly. I'm not sure how to connect Xdebug to the container given my directory structure. Then on the same host as VSCode you could then. Make sure VSCode is listening for connections, and that you have a script with a breakpoint in it ready to run. This includes running all of this on localhost, OR running VSCode and PHP in WSL2. I created a new CodeIgniter project and need to setup debugging with Xdebug against a container running in Docker Desktop. The default config for listening for Xdebug will work in most situations.
0 Comments
Leave a Reply. |