Home > PHP Framework > Laravel > How to configure xdebug for debugging in Homestead (PhpStorm)

How to configure xdebug for debugging in Homestead (PhpStorm)

青灯夜游
Release: 2021-12-24 11:10:41
forward
2055 people have browsed it

How to configure PhpStorm Xdebug for debugging in the Homestead environment. This article will introduce to you how to configure How to configure xdebug for debugging in Homestead (PhpStorm) in PhpStorm Homestead. I hope it will be helpful to you!

How to configure xdebug for debugging in Homestead (PhpStorm)

Environment

  • windows10
  • PhpStorm v2019.1.3
  • homestead v7.2 (ubuntu18.04 )
  • laravel 5.8.* (vhost: laravel.test)
  • Please configure it according to your actual environment. It doesn’t have to be the same as in my article, but the configuration process is generally similar.. .

Tips

  • Remember that PhpStorm requires PhpStorm v2019.1.3. Do you need to add
  • when accessing the above
  • ? How to configure xdebug for debugging in Homestead (PhpStorm)_session_start=vagrant, this vagrant is not fixed, it is best to use phpinfo to see

Configuring the PHP version

File => settings => languages ​​& Frameworks => PHP

If your PHP version cannot be selected at this time, please see the tips at the end of this article

How to configure How to configure xdebug for debugging in Homestead (PhpStorm) for debugging in Homestead (PhpStorm)

选择 CLI Interpreter

How to configure How to configure xdebug for debugging in Homestead (PhpStorm) for debugging in Homestead (PhpStorm)

How to configure How to configure xdebug for debugging in Homestead (PhpStorm) for debugging in Homestead (PhpStorm)

##Configure project directory mapping

    Local Path: is the directory on the windows host
  • Remote Path: is the directory in homestead

  • folder mapping
Configure How to configure xdebug for debugging in Homestead (PhpStorm)

How to configure xdebug for debugging in Homestead (PhpStorm)
How to configure xdebug for debugging in Homestead (PhpStorm) mapping

Breakpoint test

How to configure xdebug for debugging in Homestead (PhpStorm)

How to configure xdebug for debugging in Homestead (PhpStorm)##Notes:

Be sure to enable debug monitoring
  • Be sure to add the parameter
  • ?XDEBUG_SESSION_START=vagrant
  • after the browser. If you don’t want to add this thing every time, you can also install the chrome plug-in
  • ?XDEBUG_SESSION_START=vagrant
  • This vagrant is not fixed, it is the value of the IdeKey set in php.ini
  • Final effect:

How to configure xdebug for debugging in Homestead (PhpStorm)

Tips

If your
    PHP language level
  • cannot be selected , you can try the following settings
    How to configure xdebug for debugging in Homestead (PhpStorm)
Related recommendations:
The latest five Laravel video tutorials

The above is the detailed content of How to configure xdebug for debugging in Homestead (PhpStorm). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:learnku.com
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