Skip to content

rafaelmsales27/docker-php-xdebug-vscode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP/Xdebug/Docker example

Thi is an example intial repo for debuging PHP with Xdebug inside Docker. Using VS Code.

Usage

The Nginx, Dockerfile, docker-compose.yml and xbebug.ini are a start point for developing php web applications locally.

You should modified these files to your need and I do not advice using these sample files into production.

To run everything you must run the following command (positioned in the same folder as yout docker-compose.yml file):

docker-compose -p <desired-name> up -d.

VS Code configuration

Install the felixfbecker.php-debug extension.

You can create a debug configuration by going to Debug > Add Configuration... > PHP, but configuration file is included in .vscode/launch.json with the correct folder maping.

Add a breakpoint, and click on "Listen for XDebug" in the top left hand corner. Load your page, and you should get debugging information:

Credits to Sajjad Ashraf

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Dockerfile 53.7%
  • PHP 46.3%