Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Laravel configuration PhpStorm + Xdebug + Chrome settings Debug Environment     - Ubuntu manually set the DSL broadband connection (Linux)

- FreeBSD install Gnome 3 Desktop (Linux)

- Linux set the maximum number of open files nofile and nr_open, file-max Description (Linux)

- Ubuntu 14.04 virtual machine switching desktop environments (Linux)

- Java call by value and by reference (Programming)

- MongoDB 2.6 deployment replica set + partitions (Database)

- LNMP summary of the issues common 502 Bad Gateway (Server)

- JavaScript, some conclusions about the implicit conversion (Programming)

- Nginx introduced Dynamic Module Architecture (Server)

- Physical backup and recovery SYSTEM table space (Database)

- 7 JavaScript interview questions (Programming)

- Brief Linux commands (Linux)

- Linux five security TIPS (Linux)

- Hadoop2.6.3 build clusters and the development of MapReduce WIN7 by Eclipse on Linux demo (Server)

- Some practical tips Linux (Linux)

- ACL permissions Linux command (Linux)

- Swift acquaintance of values and references, the circular reference, Agent Precautions (Programming)

- Convert MySQL date string to a NULL value exception handling (Database)

- How to create a remote (Linux)

- Weld a problem in JDK 8u60 environment (Programming)

  Laravel configuration PhpStorm + Xdebug + Chrome settings Debug Environment
  Add Date : 2018-11-21      
  Brief introduction

Configure Laravel in PhpStorm the breakpoint debugging, there are two ways, the first is the most common, direct configuration and installation of a chrom look phpstorm plug can be, but this approach has some drawbacks, is the very API debugging easy, such as Ajax or client requests:
There is also a more general way, is both a genius to know through phpstorm interceptor function, can intercept any PHP request, also need to install a plug-in chrome:
https://phphub.org/topics/553, summed up very well, but only after I found this article summarizes finished, otherwise I do not write
https://laracasts.com/forum/?p=1648-phpstorm-homestead-xdebug/0, to explain in great detail in this article, it is praise
http://blog.elenakolevska.com/debugging-laravel-on-homestead/, this article is talking about can be, but on the inside the port settings and the path mapped speak flawed aspect, I wasted most of the day time to correct this problem
Configuring php.ini

After logging vagrant, use "sudo vim /etc/php5/fpm/conf.d/20-xdebug.ini" command to edit the configuration file xdebug, I basically do not have to make changes to this file, the configuration file as follows

Configuration PhpStorm

First, you can refer to http://blog.elenakolevska.com/debugging-laravel-on-homestead/ in PhpStrom to configure vagrant options. Select Preferences -> Languages & Frameworks -> PHP.

Click on the arrow pointing to the button, and then click on the "+" button, select "Remote"

Select Vagrant and set the root directory vagrantfile, that folder is selected HomeStead

After configuration is as follows:

You can click on the "Test connection" to test the configuration is working.
Configure Chrome

First we need to install Xdebug helper browser plug-ins to add parameters in the request, like: XDEBUG_SESSION_START = session_name.
Chrome: https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc;
Firefox: https://addons.mozilla.org/en-US/firefox/addon/the-easiest-xdebug/
Safari: https://github.com/benmatselby/xdebug-toggler
My development environment is Chrome at the mac. After installation, you can Xdebug helper some settings, for example, only for a specific domain name to start plug, which set white list. To access the plug-in setup options, first open the chrome plugin management page, click Xdebug helper options.

Under Options, set the IDE key to PhpStorm, and homestead.app added to the Domain filter, so that you will only be displayed for the domain debug plug.

After the plug-in installation, enter the white list domain names in a browser, I have here is homestead.app, you can see the plug-in icon in the address bar, click on the icon, select Start Debug.


After the setup is complete environment, we want to begin with PHP debug. Click Run -> Start Listening for PHP Debug Connections,

Then enter the chrome before the domain name. That homestead.app, then PhpStorm will pop up a dialog box, select the "Accept" to.

Then choose Preferences -> Languages & Frameworks -> PHP -> Servers

Then we need to modify the item corresponding to the outer path mapping, otherwise it can only be index.php debug, and break other files will not work, http: //laravel.io/forum/08-31 -2014-homestead-phpstorm-xdebug-only-works-with-indexphp

After everything is set up, you can enjoy for a debug with PHP

POST request

When we use POSTMan debug post request, add the url query: XDEBUG_SESSION_START = PHPSTORM can, at this time the breakpoint can be intercepted.
- How to ensure the Linux SSH login security with one-time password (Linux)
- Quick paging ROW_NUMBER conducted (Database)
- Java memory mechanism Description (Programming)
- Actual SSH port forwarding (Linux)
- How to use Android Studio development / debugging Android source code (Linux)
- DRBD + Heartbeat solve NFS single point of failure (Server)
- Why is the ibdata1 file growing in MySQL? (Database)
- To share some very useful Vim command (Linux)
- C # assembly calls across constants, variables and functions (Programming)
- Parts of the partition is not recognized after Debian mount mobile hard disk (Linux)
- Vim Common Command Summary (Linux)
- Cross server / client backup command: rsync use (Server)
- OpenGL ES 3.0 vertex buffer (Programming)
- Let VMware ESXi virtual switch support VLAN (Linux)
- Advanced Search Oracle study notes (Database)
- GROUP BY extension (Database)
- WinSCP to transfer text files will automatically convert the format (Linux)
- Apache Tomcat integration and resin (Server)
- Ubuntu 12.04 configure NVIDIA CUDA 5.5 Record (Linux)
- You can not ignore the seven Git tips (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.