

Matching breakpoint '/home/caio/dev/project/html/info.php:1'Īgainst location '/var/If these paths don't match, adjust your path mappings. If you tell Xdebug to make a log file ( -dxdebug.log=/tmp/xdebug.log and -dxdebug.log_level=10) it will create a log file in your container, where the contents tell you which breakpoint file name is tried to be matched against the files that PHP sees, something like: DEBUG: I: I might not have gotten the exact right paths in this configuration.

Launch.json inside ".vscode" directory: /html", My OS is Ubuntu 20.04.5 LTS Dockerfile, docker-compose.yml and 90-xdebug.ini are in project's root.ĬOPY 90-xdebug.ini "/usr/local/etc/php/conf.d" But I don't know why VSCode can't debug it. then I have to execute the commands in Dockerfile manually.Īnyways, after installing, I know that the installation worked because the xdebug_info() function works. And after the container is up, I check the directory and the file isn't there. I assume that is because in the file it has a COPY command to copy a file (called 90-xdebug.ini) from my project to a specific directory. I use VSCode and somehow this debugger it's not working.Īpparently the Dockerfile is not been executed when I use docker compose up -d command. We can see that in the configuration we've specified it to connect to the remote JVM using the 5005 port.I'm trying to create a docker container with PHP and Xdebug to use step debugging. So the above command starts our Docker container, and we can now configure remote debugging configuration to connect to it: In the JAVA_TOOL_OPTIONS we pass the value -agentlib:jdwp=transport=dt_shmem,address=,server=y,suspend=n to allow the Java process to start a JDB debug session and pass the value address=*:5005 to specify that 5005 will be our remote debugging port. Introduction Laravel Sail is a light-weight command-line interface for interacting with Laravels default Docker development environment. We are using the -d extension for running docker in detached mode and -e for passing JAVA_TOOL_OPTIONS as an environment variable to the Java process. Apart from the normal HTTP port, which is 8080, we are also mapping an additional port, 5005, for remote debugging using the -p extension.

Here docker-java-jar is our image name, and latest is its tag. If we were using Java 11, we'd use this command instead: docker run -d -p 8080:8080 -p 5005:5005 -e JAVA_TOOL_OPTIONS="-agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n" docker-java-jar:latest Apparently the Dockerfile is not been executed when I use docker compose up -d command. I use VSCode and somehow this debugger it's not working. Docker run -d -p 8080:8080 -p 5005:5005 -e JAVA_TOOL_OPTIONS="-agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=n" docker-java-jar:latest 0 I'm trying to create a docker container with PHP and Xdebug to use step debugging.
