Home  >  Article  >  Backend Development  >  How to perform Xdebug breakpoint debugging in PHPStorm under laradock

How to perform Xdebug breakpoint debugging in PHPStorm under laradock

不言
不言Original
2018-08-03 09:46:163210browse

This article introduces you to how to perform Xdebug breakpoint debugging in PHPStorm under laradock. It has a good reference value and I hope it can help friends in need.

laradock Configuration

Edit laradock/.env file

WORKSPACE_INSTALL_XDEBUG=true
PHP_FPM_INSTALL_XDEBUG=true

Rebuild the container

docker-compose build workspace php-fpm
# 启动
docker-compose up -d nginx mysql redi

PHPStorm Configuration

Open PHPStorm, File -> Settings and enter Languages ​​& Frameworks -> PHP -> Servers. Create a new Server, as shown below

  • Name The filled content must be the same as the laradock/.env fileserverName Consistent, the default is laradock

  • Host is the Host address corresponding to server;Port No need to modify; Debugger Select Xdebug

  • Set directory mapping (Use path mappings) , Local directory -> Remote directory

### Remote Interpreter ####################################

# Choose a Remote Interpreter entry matching name. Default is `laradock`
PHP_IDE_CONFIG=serverName=laradock

How to perform Xdebug breakpoint debugging in PHPStorm under laradock

Set a breakpoint, click the phone button to start monitoring, and then you can perform breakpoint debugging

How to perform Xdebug breakpoint debugging in PHPStorm under laradock

How to perform Xdebug breakpoint debugging in PHPStorm under laradock

## Recommended related articles:

How to obtain video length and php.ini configuration in php

Introduction to the method of using arrays as parameters in php to optimize performance ( Code attached)

The above is the detailed content of How to perform Xdebug breakpoint debugging in PHPStorm under laradock. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn