How to perform Xdebug breakpoint debugging in PHPStorm under laradock

不言
Release: 2023-04-03 14:28:02
Original
3233 people have browsed it

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
Copy after login

Rebuild the container

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

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template