Debug PHP and JavaScript Together in VS Code Using Docker without Browser Debugging
In this video, we’ll set up a complete, professional development environment to debug both PHP and JavaScript inside Visual Studio Code, all running within Docker — without relying on the browser debugger.
You’ll learn how to build a clean, maintainable workflow that integrates PHP with Xdebug, Apache, and JavaScript debugging, so you can seamlessly switch between frontend and backend debugging within VS Code.
We’ll cover everything from scratch, including:
a. Setting up Docker with PHP 8.3, Apache, and Xdebug
b. Configuring Dockerfile and docker-compose.yml for live code synchronization
c. Setting up custom Apache and Xdebug configurations
d. Writing and debugging PHP and JavaScript directly inside VS Code
e. Creating a professional launch.json for combined PHP and JS debugging
f. Running and testing the entire setup end-to-end
Timestamps
00:00 – Introduction
00:48 – Overview of the project structure
02:45 – Building the application foundation
02:54 – Implementing the PHP script
05:58 – Implementing the JavaScript script
07:30 – Configuring Apache settings
08:44 – Setting up Xdebug configuration
09:47 – Creating the Dockerfile
11:07 – Writing the Docker Compose configuration
12:35 – Setting up VS Code launch.json for debugging
15:03 – Building the Docker container
15:15 – Accessing the running application
15:50 – Setting breakpoints for JavaScript debugging
17:00 – Setting breakpoints for PHP debugging
17:30 – Configuring VS Code to debug both PHP and JavaScript
18:35 – Running combined PHP and JavaScript debugging
19:30 – Final notes and conclusion
By the end of this tutorial, you’ll have a fully functional Dockerized development environment where both backend and frontend debugging work together - efficiently, professionally, and entirely within VS Code.
You can access the repository in github https://github.com/shrestha-bishal/do... or github gist https://gist.github.com/shrestha-bish...
En esta página del sitio puede ver el video en línea Debug PHP and JavaScript Together in VS Code Using Docker without Browser Debugging de Duración hora minuto segunda en buena calidad , que subió el usuario Bishal Shrestha | SWE 05 noviembre 2025, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 92 veces y le gustó 6 a los espectadores. Disfruta viendo!