Use Editplus2's user tool to Debug PHP in real time

Source: Internet
Author: User
P after reading the document on visual programming of J2SDK using Editplus in FonTomas (see www. csdn. netDeveloparticle1515416.shtm), I came up with the idea of letting Editplus debug the PHP program as a PHP programmer. After my tests and N (N10) tests, Editplus can finally implement this function perfectly. EditPlus

P> Read the FonTomas "using Editplus to realize J2SDK Visual Programming" (see the http://www.csdn.net/Develop/article/15/15416.shtm) after the article, the author as a PHP programmer, sprout let Editplus debugging PHP program idea. After my tests and N (N> 10) tests, Editplus can finally implement this function perfectly. The specific implementation method is as follows:

1. open Editplus and choose Tool> Configure User Tools... (configure user tools) "menu (The author is now using the version of V2.11 English version, this site (http://www.hooday.com) download columns have downloaded using the Chinese version of friends can see the following picture comparison ).


2. in the pop-up window, select "Add Tool (new Tool)-> Program (Program)" to give a memorable name to the new Program. for example, here we use "Debug PHP ", enter "Debug PHP" in Menutext ". Click the button on the right of "Command (Command line)" to find the path of your php.exe. here is "c: \ php \ php.exe ". Click the drop-down button on the right of "Argument (parameter)" to select FilePath, and then select the check box before "Capture output (Capture output.


3. test now. create a new php file. press Ctrl + 1 to activate the tool we just set. (if you set multiple tools, the shortcut keys may be different ), now you can see that it is working properly. However, it is not ideal: If your PHP program fails, the output window will prompt you for the first line of error. if you click this line of prompt, Editplus will always prompt you that you cannot find the xx file, whether to create. Next, we need to modify this function.
4. open the user tool setting window and find the "Debug PHP" tool you just set. Click "output Pattern" next to the Capture Output check box... (output mode) "button will pop up a form that defines the output mode, remove the check box before" Use default output pattern (Use default output mode, enter "^. + in (. +) line ([0-9] +) "(excluding quotation marks), careful friends may find that the regular expression syntax is also used here. Then, select "Tagged Expression 1" in the "File name" drop-down menu below, that is, the first parameter in the above regular Expression, "Line (number of rows) select Tagged Expression 2 from the drop-down menu and leave the drop-down item "Column" empty. Save the settings.


5. now, let's try again. double-click the number of wrong lines. Editplus will automatically activate the error file and position the cursor to the wrong line. is it especially convenient ?! (Click to enlarge)


Now, Editplus has gone through our "transformation" to Debug PHP files in real time. although it is not a "Visualized" interface, it is very useful for common small programs to find errors. Editplus is really a rare tool. if you have any tips, don't forget to share it with everyone. ^ O ^ chin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.