How to debug hyperf gracefully with phpstorm

Time:2021-4-21

preface:

I learned this method after watching the live broadcast of Huangdao master last night. Today, I will share this skill with you at noon. We are debuggingHyperfYou may always need to restart some services and click againpostmanInterface request button, check whether the debugging results are normal, this article is to teach you how to use thePhpStormTo complete this series of operations.

1、 Hyperf quick restart

Step one:

clickPhpStormThe button in the upper right corner, as shown in the figure:

How to debug hyperf gracefully with phpstorm

Step 2:

Click the Add button in the top left corner of the pop-up box, and then clickPHP ScriptAs shown in the figure:

How to debug hyperf gracefully with phpstorm

How to debug hyperf gracefully with phpstorm

Step 3:

Fill in the PHP script information:

Name: the name of the script. Here we call it hyperf

If there is a pop-up option for you to select fix, just open it and select the corresponding PHP version

Fill in the above information, as shown in the figure:

How to debug hyperf gracefully with phpstorm

Click save.

Step 4:

Using the script information we just configured, clickPhpStormIn the upper right corner, select the one you just configuredHyperfScript, as shown in the figure:

How to debug hyperf gracefully with phpstorm

After selection, click the start button next to it to runHyperfAs shown in the figure:

How to debug hyperf gracefully with phpstorm

How to debug hyperf gracefully with phpstorm

In this way, the opening is successful. Let’s have a try, as shown in the figure:

How to debug hyperf gracefully with phpstorm

Step 5:

Use shortcut keys to restart quickly (my method here may not be the most convenient, if there is a more convenient one, please improve ~)

openphpstormClick keymap on the left to see what the run shortcut in tool windows is. Here I use Mac, as shown in the figure:

How to debug hyperf gracefully with phpstorm

My key is Command + 4, which can call up the script running window, as shown in the figure:

How to debug hyperf gracefully with phpstorm

Then the restart command is Command + R, which is a bit like browser refresh. For windows, put the mouse on the green restart icon in the lower left corner, and you will be prompted with shortcut keys, as shown in the figure:

How to debug hyperf gracefully with phpstorm

The operation is as follows:Command + 4 and Command + RYou can quickly restart the hyperf service.

2、 Configure phpstorm’s rest client interface to request clients

1. Open the rest client

clickPhpStormTop Toolbar, findToolsAfter clicking, put the mouse on theHTTP clientThere are three options, we chooseTest RESTful Web ServiceAs shown in the figure:

How to debug hyperf gracefully with phpstorm

2. How to use it?

It’s actually very simple, andpostmanUsage is almost the same, the above parameters also explain it to you!

HTTP method: request method

As shown in the figure, the request is successful

How to debug hyperf gracefully with phpstorm

Conclusion:

Although this tutorial is very simple, no technical content, but still released to the community to help more new contactsHyperfLearn together and make progress together!

This work adoptsCC agreementReprint must indicate the author and the link of this article

The second young criminal

Recommended Today

Large scale distributed storage system: Principle Analysis and architecture practice.pdf

Focus on “Java back end technology stack” Reply to “interview” for full interview information Distributed storage system, which stores data in multiple independent devices. Traditional network storage system uses centralized storage server to store all data. Storage server becomes the bottleneck of system performance and the focus of reliability and security, which can not meet […]