Use the user tool function of Editplus2 to debug PHP on the fly_PHP tutorial

WBOY
Release: 2016-07-15 13:23:14
Original
874 people have browsed it

After reading the article "Using Editplus to implement visual programming of J2SDK" by FonTomas (see http://www.csdn.net/Develop/article/15/15416.shtm), the author used it as a PHP program Member, came up with the idea of ​​letting Editplus debug PHP programs. After my testing and N times of experimentation, I was finally able to make Editplus realize this function perfectly. The specific implementation method is as follows:

1. Open Editplus and select the "Tool->Configure User Tools..." menu (the version I am currently using is the English version V2.11, Friends who can download and use the Chinese version in the download section of this website (http://www.phpe.net) can refer to the picture below for comparison).
Use the user tool function of Editplus2 to debug PHP on the fly_PHP tutorial

2. Select "Add Tool (New Tool)->Program (Program)" in the pop-up window and give the new program an easy-to-remember name. For example, here we use " Debug PHP", enter "Debug PHP" in the Menutext (menu text). Click the button to the right of "Command (Command Line)" and find the path where your php.exe is located. This is "c:phpphp.exe". Then click the drop-down button on the right side of "Argument" to select FilePath, and finally select the check box in front of "Capture output".
Use the user tool function of Editplus2 to debug PHP on the fly_PHP tutorial

3. Now to test it, create a new php file and press the shortcut key Ctrl+1 to activate the tool we just set (if you set up multiple tools, the shortcut key may be different), now you can see that it is working properly. But there is one thing that is not ideal: if your PHP program makes an error, the output window will prompt you on which line the error occurred. Double-click this line to prompt, and Editplus always prompts you that it cannot find a certain file and whether to create a new one. Next we need to fix this feature.

4. Open the user tool settings window just now and find the "Debug PHP" tool you just set. Click the "Output Pattern..." button next to the Capture output check box. A form defining the output pattern will pop up. Change the "Use default output pattern" in front of Remove the checkbox and enter "^.+ in (.+) line ([0-9]+) " (excluding quotation marks) in the text box of "Regular expression (regular expression)", carefully Friends may find that the syntax used here is actually regular. Then, select "Tagged Expression 1" in the "File name" drop-down menu below, which is the first parameter in the regular expression above, and select "Tagged Expression 2" in the "Line (number of lines)" drop-down menu. The "Column" dropdown remains empty. Then save the settings.
Use the user tool function of Editplus2 to debug PHP on the fly_PHP tutorial

5. Okay, let’s try it again now. Double-click the error line and Editplus will automatically activate the error file and position the cursor to the error line. Isn’t it particularly convenient? ?!
Use the user tool function of Editplus2 to debug PHP on the fly_PHP tutorial

Now, after our "transformation", Editplus can debug PHP files in real time. Although it is not a "visual" interface, it is suitable for some ordinary small programs. It is very useful for checking errors. Editplus is really a rare and good tool. If you have any tips on how to use it, don’t forget to share it with everyone.



www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446878.htmlTechArticleRead FonTomas's "Using Editplus to implement visual programming of J2SDK" (see http://www.csdn.net /Develop/article/15/15416.shtm), as a PHP programmer, the author came up with the idea of ​​Edit...
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!